A memory failure processing method, device and electronic equipment

By dividing the memory storage space into paging and recording mirrored data, the processing problem in memory failure is solved, and the page-level fault processing is achieved, which improves the robustness of the chip and the reliability of the memory.

CN118571296BActive Publication Date: 2024-11-15格创通信(浙江)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411052475.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-15
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

The prior art cannot effectively handle memory failures, resulting in a decrease in chip robustness, and resetting the entire chip to handle faults will affect other paging work.

Method used

By dividing the memory storage space into different pages and recording mirror data in the processor, after determining the fault paging, the mirror data is written into the target paging, and the address of the fault paging is redirected to the address of the target paging, Implement fault handling and pagination-level fault handling.

Benefits of technology

The memory failure handling is realized, the chip is improved, the chip is robust, the impact on other paging during fault processing is avoided, and the memory reliability is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118571296B_ABST
    Figure CN118571296B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a memory fault processing method, device and electronic device, which relates to the field of hardware technology. The storage space of the memory is divided into different pages. The storage unit of the processor controlling the memory records the mirror data of the data stored in the memory, which is applied to the processor. The method includes: when it is determined that the memory fails, determining the fault page to which the error address of the failure belongs; when data is stored in the fault page, selecting a target page from the standby page that does not store data, and writing the mirror data corresponding to the fault page into the target page; redirecting the address of the fault page to the address of the target page. The scheme provided by the embodiment of the present invention can realize the fault processing of the memory in the chip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of hardware technology, and in particular to a memory fault processing method, device and electronic equipment. Background Art

[0002] The memory used to store data in the chip can provide reliable data storage, which is crucial for the chip to achieve efficient data processing. However, the memory will inevitably fail in the process of storing data, and after the memory fails, it needs to be processed for the failure. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a memory fault processing method, device and electronic device to implement memory fault processing. The specific technical solution is as follows:

[0004] In a first aspect, an embodiment of the present invention provides a method for handling a memory failure, wherein a storage space of the memory is divided into different pages, a storage unit of a processor controlling the memory records mirror data of data stored in the memory, and is applied to the processor, the method comprising:

[0005] In the case where it is determined that the memory fails, determining a faulty page to which the faulty address belongs;

[0006] In the case where data is stored in the faulty page, a target page is selected from the standby pages that do not store data, and the mirror data corresponding to the faulty page is written into the target page;

[0007] The address of the faulty page is redirected to the address of the target page.

[0008] In one embodiment of the present invention, before selecting a target page from pages that do not store data and writing the mirror data corresponding to the faulty page into the target page, the method further includes:

[0009] Writing the mirror data corresponding to the faulty page back to the faulty page;

[0010] Determine whether a fault continues to occur at the error address in the faulty page after writing back;

[0011] If so, the step of selecting a target page from the pages that do not store data and writing the mirror data corresponding to the faulty page into the target page is performed.

[0012] In one embodiment of the present invention, writing back the mirror data corresponding to the faulty page to the faulty page includes:

[0013] The mirror data corresponding to the row where the error address is located is written back to the row in the faulty page.

[0014] In one embodiment of the present invention, the method further comprises:

[0015] If the faulty page to which the faulty address belongs belongs to is a standby page, the page is moved out of the standby page.

[0016] In one embodiment of the present invention, it is determined that the memory fails in the following cases:

[0017] Receiving first fault information reported by a memory built-in self-test mbist in the memory, wherein the first fault information is reported when a memory fault is detected by mbist during the initialization of a chip in which the memory is located and the fault cannot be repaired;

[0018] and / or

[0019] During the operation of the chip, the number of times of receiving error checking and correcting ECC error information reported by the same basic addressing unit reaches a preset number.

[0020] In a second aspect, an embodiment of the present invention provides a memory fault processing device, wherein the storage space of the memory is divided into different pages, and the storage unit of the processor controlling the memory records the mirror data of the data stored in the memory, which is applied to the processor, and the device includes:

[0021] A paging determination module, for determining a faulty page to which an erroneous address of the fault belongs when it is determined that the memory has failed;

[0022] A data writing module is used to select a target page from the standby pages that do not store data, and write the mirror data corresponding to the faulty page into the target page when data is stored in the faulty page;

[0023] The redirection module is used to redirect the address of the fault page to the address of the target page.

[0024] In one embodiment of the present invention, the device further comprises:

[0025] A data write-back module, used for writing the mirror data corresponding to the faulty page back to the faulty page;

[0026] The fault judgment module is used to judge whether the fault continues to occur at the error address in the faulty page after writing back; if so, trigger the execution of the data writing module.

[0027] In one embodiment of the present invention, the data write-back module is specifically used to:

[0028] The mirror data corresponding to the row where the error address is located is written back to the row in the faulty page.

[0029] In one embodiment of the present invention, the device further comprises:

[0030] The page removal module is used to remove the page out of the standby page if the faulty page to which the faulty address belongs belongs to the standby page.

[0031] In one embodiment of the present invention, it is determined that the memory fails in the following cases:

[0032] Receiving first fault information reported by a memory built-in self-test mbist in the memory, wherein the first fault information is reported when a memory fault is detected by mbist during the initialization of a chip in which the memory is located and the fault cannot be repaired;

[0033] and / or

[0034] During the operation of the chip, the number of times of receiving error checking and correcting ECC error information reported by the same basic addressing unit reaches a preset number.

[0035] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0036] Memory, used to store computer programs;

[0037] The processor is used to implement any method step described in the first aspect when executing a program stored in the memory.

[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0039] In a fifth aspect, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the method steps described in the first aspect.

[0040] Beneficial effects of the embodiments of the present invention:

[0041] In the embodiment of the present invention, the storage space of the memory is divided into different pages. When a fault occurs in the memory, the fault page where the fault occurs can be determined. Since the storage unit of the processor records the mirror data, the backup of the data in the memory is achieved. Therefore, when a fault page fails, the data in the backup fault page can be stored in the target page, and the address of the fault page can be redirected to the address of the target page, which is equivalent to using the target page instead of the fault page. When the fault page needs to be accessed later, the access will be redirected to the target page that is not faulty, and the fault is handled. In addition, the fault handling is performed in pages. During the fault handling process, only the fault page needs to be redirected, and the entire chip does not need to be reset, that is, during this period, the work of other pages in the chip's memory except the fault page will not be affected. Therefore, while the fault handling of the memory is achieved through the embodiment of the present invention, the robustness of the chip can also be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and a person skilled in the art can also obtain other drawings based on these drawings.

[0043] Figure 1 A schematic diagram of a principle of fault detection in the related art;

[0044] Figure 2 A schematic diagram of a fault repair principle provided in the related art;

[0045] Figure 3 A schematic diagram of a memory failure repair in the related art;

[0046] Figure 4 A schematic diagram of a flow chart of a first memory failure processing method provided by an embodiment of the present invention;

[0047] Figure 5 A redirection schematic diagram provided by an embodiment of the present invention;

[0048] Figure 6 A schematic flow chart of a second memory failure processing method provided by an embodiment of the present invention;

[0049] Figure 7 A schematic flow chart of a third memory failure processing method provided by an embodiment of the present invention;

[0050] Figure 8 A schematic diagram of a fault paging process provided by an embodiment of the present invention;

[0051] Fig. 9 A schematic diagram of the structure of a memory fault processing device provided by an embodiment of the present invention;

[0052] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on the present invention belong to the scope of protection of the present invention.

[0054] In order to better describe the difference between the embodiments of the present invention and the related art, firstly, a fault handling method of a memory in the related art is described.

[0055] In ultra-high-performance message forwarding chips, SRAM (Static Random-Access Memory) is a common memory. SRAM generally provides mbist (memory build-in-self test) function, which includes fault detection and fault repair.

[0056] See also Figure 1 , which is a schematic diagram of a fault detection principle in the related technology.

[0057] The figure includes an internal self-test controller (BIST controller, Built-in Self-Test Controller). The internal self-test controller is data-interconnected with the address generator (Address Generator), the data generator (Data Generator) and the comparator (Comparator) respectively. The internal self-test controller is connected to the chip select / write enable (CS / WE, Chip Select / Write Enable) interface of the memory, the address generator is connected to the address (Addr, Address) interface of the memory, the data generator is connected to the data input (Din, Data in) interface of the memory, and the comparator is connected to the data output (Dout, Data out) interface.

[0058] Through the above structure, the internal self-test controller can determine whether a fault occurs in the memory by traversing the address and data buses through a preset algorithm (such as the chessboard method).

[0059] In addition, SRAM generally provides a BISR (Built In Self-Repair) function, which achieves fault repair and self-healing of the memory at the cost of providing some hardware resource redundancy.

[0060] See also Figure 2 , which is a schematic diagram of a fault repair principle provided in the related art.

[0061] The figure includes the internal self-test controller, test access point (TAP, Test Access Point), electronic fuse array (eFuse Array), fuse controller (Fuse Controller), built-in self-repair register (BISR REG, BISRRegister), other built-in self-repair registers (Other BISR Registers), internal self-test controller interface (BISTInterface), random access memory with redundancy (RAM with Redundancy, Random Access Memorywith Redundancy). The random access memory with redundancy contains a repair port (Repair Port), and the built-in self-repair register is connected to the repair port. The internal self-test controller interface contains a built-in redundancy analysis register (BIRA REG, Built-In Re-dundancy Analysis Register) and a built-in redundancy analysis tool (BIRA Engine).

[0062] The above-mentioned fault repair function is strongly related to hardware resources. Considering the cost and chip area, generally only limited redundancy for fault repair can be provided. For example, only one column of storage resources in the memory is provided as redundancy. Then, when it is determined that the memory has a fault, when the fault occurs in the same column in the storage array, it can be repaired. The repair method is to abandon the faulty column of storage resources and use a redundant column of storage resources to replace the faulty column of storage resources for data storage. That is, when the fault occurs in the same column of the storage array, the fault can be repaired. However, if the fault occurs in multiple columns, or the fault originally occurs in one column, but a new column fails after running for a period of time, the fault cannot be repaired due to insufficient redundant storage resources.

[0063] See also Figure 3 , which is a schematic diagram of memory fault repair in the related art.

[0064] Each square in the figure represents a node in the storage array of the memory. The gray node in the figure fails, and the failed node is located in the same column (i.e., the second column from the left). In this case, a redundant column of storage resources (i.e., the rightmost column of storage resources) can be used to repair the fault. The arrows in the figure indicate that storage resources in other columns are used to replace the original storage resources. That is, the storage resources in the third column on the left are used to replace the storage resources in the second column on the left, the storage resources in the fourth column on the left are used to replace the storage resources in the third column on the left, and the redundant storage resources are used to replace the storage resources in the fourth column on the left. Therefore, in the subsequent data storage process, redundant storage resources can be used to continue data storage, and the failed storage resources are no longer needed, thereby realizing fault repair.

[0065] However, as mentioned above, this repair method can only be used when the size of the redundant storage resources allows. If the fault is unrepairable, the chip will often report to the terminal, and the processor of the control chip will record the fault and reset the chip.

[0066] In the related art, if the processor detects an unrepairable or uncorrectable fault in the memory, the entire chip will be reset to troubleshoot. However, in reality, the location where the fault occurs may be only a small part of a memory or even an addressing unit, and there may be multiple memories in a chip. Resetting the entire chip when an addressing unit fails will cause the entire chip to fail to work, thereby reducing the robustness of the chip. In order to solve the above problems, an embodiment of the present invention provides a memory fault processing method, device and electronic device.

[0067] It should be noted that the above introduction to the related technology revolves around SRAM, but in actual scenarios, other memories besides SRAM also have the same problem, which is also applicable to the embodiments of the present invention. The embodiments of the present invention are not only applicable to SRAM.

[0068] In one embodiment of the present invention, the storage space of the memory is divided into different pages, and the storage unit of the processor controlling the memory records the mirror data of the data stored in the memory. The processor may be a CPU (Central Processing Unit) or other processors, which is not limited in the embodiment of the present invention. The mirror data may be referred to as shadow memory.

[0069] See also Figure 4 , which is a flow chart of a first memory fault processing method provided in an embodiment of the present invention, applied to the above-mentioned processor, and includes the following steps S401-S403.

[0070] S401: When it is determined that the memory fails, determine the faulty page to which the faulty address belongs.

[0071] Specifically, the processor may determine that a memory failure occurs after receiving memory failure information reported by the chip.

[0072] In one embodiment of the present invention, it is determined that the memory fails in the following situation (I) and / or situation (II):

[0073] Case (1): The first fault information reported by the above storage is received.

[0074] The first fault information is reported when a memory fault is detected by mbist during the initialization of the chip where the memory is located and the fault cannot be repaired.

[0075] Specifically, the chip can start the mbist test on the memory before power-on initialization. If a fault is detected in the memory, the BISR function can be triggered to repair and self-heal the fault. If the BISR cannot be repaired, the first fault information will be reported to the processor, indicating that the chip initialization failed and the chip is currently unavailable.

[0076] Case (II): During the operation of the above chip, the number of times the ECC error information reported by the same basic addressing unit is received reaches a preset number.

[0077] Specifically, after the chip is successfully initialized, it can also detect memory failures during chip operation through ECC (Error Checking and Correcting).

[0078] In this case, a Hamming code is inserted for each row in the memory array in the memory. The Hamming code can be used to detect multi-bit errors in each row and correct single-bit errors. If an uncorrectable multi-bit error occurs, the chip will report ECC error information to the processor. The processor can record ECC error information, thereby recording the failure of the memory during the operation of the chip.

[0079] If the processor receives the same ECC error information for a preset number of times, it can be determined that the memory frequently has the same fault, and in this case, fault processing is required. For example, the preset number of times is 3, 5, 7, etc.

[0080] S402: In the case where data is stored in the faulty page, a target page is selected from the standby pages that do not store data, and the mirror data corresponding to the faulty page is written into the target page.

[0081] In one embodiment of the present invention, the processor records the addresses of standby pages that do not store data. The addresses of the standby pages can be stored in a free pool. The processor can randomly select one from all standby pages as a target page, or select the frontmost standby page as the target page in the order of the addresses of the standby pages from front to back, or select the standby page closest to the address of the faulty page as the target page.

[0082] Since there is an error address in the faulty page and data is stored in the faulty page, if the faulty page is continued to be used for data storage, the normal operation of the chip will be affected. In this case, since the processor stores mirror data, the neck data corresponding to the faulty page can be written into the target page, so that the target page stores the same data as the faulty page and can replace the faulty page.

[0083] S403: redirecting the address of the faulty page to the address of the target page.

[0084] Since the target page stores the same data as the faulty page, the target page can replace the faulty page. On this basis, after redirecting the address of the faulty page to the address of the target page, subsequent data reading, writing, searching, and deleting of the faulty page can be completed in the target page. This is equivalent to the target page that has not failed replacing the faulty page that has failed, and continues to implement the data storage function, that is, the fault repair is achieved in the above way.

[0085] In one embodiment of the present invention, an address table recording the addresses of various pages is stored in the processor, which can be also called a page table. The address of the faulty page recorded therein can be changed to the address of the target page, so that when the faulty page is subsequently operated, the address found in the page table is the address of the target page, thereby completing the data operation in the target page. Address redirection of the faulty page is achieved.

[0086] The paging table also stores the size of each page.

[0087] In another embodiment of the present invention, the correspondence between the address of the faulty paging and the address of the target paging may also be recorded. If the received data operation request carries the address of the faulty paging, the address of the faulty paging may be changed to the address of the target paging according to the above correspondence, thereby redirecting the data operation request to the target paging.

[0088] See also Figure 5 , which is a redirection schematic diagram provided in an embodiment of the present invention.

[0089] In an embodiment of the present invention, each page may be divided into different tables. Different tables are distinguished by different table numbers. The table number may be referred to as TID (Table Identification).

[0090] The portion framed by the dotted box in the upper part of the figure is the mirror data, which includes the mirror data in page 1 of page table A, the mirror data in page 2 of page table A, and the mirror data in page table B. Among them, the mirror data in page table B is also divided in units of pages, but it is not shown in the figure.

[0091] The dotted box at the bottom of the figure shows the paging table and the pages in the memory. The right side is the memory, which includes page 1 in page table A, page 2 in page table A, page table B, redirected page 2 in page table A, and free pool. The pages in page table B are not shown in the figure.

[0092] The gray box in the figure indicates the location of the faulty address. It can be seen that page 2 in page table A is faulty and is a faulty page. In this case, page 2 in page table A needs to be redirected to page 2 in page table A after redirection. The arrow between the mirror data in page 2 in page table A and page 2 in page table A after redirection indicates that data will be written to the page.

[0093] In addition, the figure shows two entries in the paging table. The first entry points to page 1 in page table A and records that the size of page 1 is S and the address is X.

[0094] The dotted arrow of the second entry points to page 2 in page table A, and the solid arrow points to page 2 in page table A after redirection, indicating that the entry originally records the information of page 2 in page table A, and after redirection, records the information of page 2 in page table A after redirection. The size of page 2 is recorded as S, and the address is changed from the original Y to Z. Y is the address of page 2 in the original page table A, and Z is the address of page 2 in page table A after redirection.

[0095] As can be seen from the above, in the embodiment of the present invention, the storage space of the memory is divided into different pages. When a fault occurs in the memory, the fault page where the fault occurs can be determined. Since the storage unit of the processor records the mirror data, the backup of the data in the memory is achieved. Therefore, when a fault page fails, the data in the backup fault page can be stored in the target page, and the address of the fault page can be redirected to the address of the target page, which is equivalent to using the target page instead of the fault page. When the fault page needs to be accessed later, the access will be redirected to the target page that is not faulty, and the fault is handled. In addition, the fault handling is performed in pages. During the fault handling process, only the fault page needs to be redirected, and the entire chip does not need to be reset, that is, during this period, the work of other pages in the chip's memory except the fault page will not be affected. Therefore, while the fault handling of the memory is achieved through the embodiment of the present invention, the robustness of the chip can also be improved.

[0096] In another embodiment of the present invention, see Figure 6 , is a flow chart of a second memory failure processing method provided by an embodiment of the present invention, which is similar to the above Figure 4 Compared with the embodiment shown, before the above step S402, the following steps S404-S405 are also included.

[0097] S404: writing the mirror data corresponding to the faulty page back to the faulty page.

[0098] Since the fault in the faulty page may not be caused by a fault in the memory itself, it may be caused by other reasons such as a network failure or an algorithm error. In other words, in this case, the data storage function of the faulty page itself is not a problem, and the faulty page can continue to store data.

[0099] Therefore, in this case, the mirror data corresponding to the faulty page may be first written back to the faulty page. Specifically, the mirror data may be used to overwrite the data originally stored in the faulty page.

[0100] In one embodiment of the present invention, all mirror data corresponding to the faulty page may be written back to the faulty page.

[0101] In another embodiment of the present invention, the mirror data corresponding to the row where the error address is located can be written back to the row in the faulty page, that is, only part of the data in the faulty page is written back, thereby reducing the amount of write-back data and achieving rapid fault processing.

[0102] S405: Determine whether a fault continues to occur at the error address in the faulty page after the write-back.

[0103] If the fault of the faulty page is not caused by the fault of the memory itself, then theoretically, the fault at the faulty address in the faulty page will not continue to occur after writing back. Therefore, if there is no further fault at the faulty address after writing back, it can be determined that the fault at the faulty address has been eliminated and no further processing is required, and the processing can be terminated.

[0104] On the contrary, if the faulty address in the faulty page still fails after the write-back, it means that the fault is not caused by network or algorithm problems, and theoretically the fault is caused by the fault of the memory itself. In this case, step S402 can be executed to replace the faulty page with the target page.

[0105] As can be seen from the above, in the embodiment of the present invention, before using the target page to replace the faulty page, you can first try to use data writeback to eliminate the fault in the faulty page caused by reasons other than the memory itself. If the fault can be eliminated by this method, there is no need to use the target page to replace the faulty page. This can avoid directly using the target page to replace the faulty page, resulting in the direct abandonment of the faulty page with no fault in its own data storage capacity, resulting in a waste of storage space.

[0106] In another embodiment of the present invention, see Figure 7 , is a flow chart of a third memory failure processing method provided by an embodiment of the present invention, which is similar to the aforementioned Figure 4 Compared with the embodiment shown, the method further includes the following step S406.

[0107] S406: If the faulty page to which the faulty address belongs is a standby page, move the page out of the standby page.

[0108] In the case that the faulty page to which the faulty address belongs belongs to a standby page, the standby page fails and cannot be used for data storage, so the page is moved out of the standby page.

[0109] See also Figure 8 , is a schematic diagram of fault paging processing provided by an embodiment of the present invention.

[0110] The figure includes page table A and page table B, both of which include paging not shown in the figure. The gray box included in the paging removed from the standby paging indicates the location of the error address. In addition, the figure also includes a free pool, which includes other standby paging that has not been removed.

[0111] As can be seen from the above, the solution provided in the embodiment of the present invention can also perform fault detection on the standby page. If the faulty page is detected to be a standby page, the faulty page is moved out of the standby page to prevent the standby page from being used for data storage later, resulting in storage failure.

[0112] Corresponding to the aforementioned memory fault processing method, an embodiment of the present invention further provides a memory fault processing device.

[0113] See also Fig. 9 , is a schematic diagram of the structure of a memory fault processing device provided by an embodiment of the present invention, wherein the storage space of the memory is divided into different pages, and the storage unit of the processor controlling the memory records the mirror data of the data stored in the memory, which is applied to the processor, and the device includes:

[0114] A paging determination module 901, configured to determine a faulty page to which an error address of the faulty memory belongs when it is determined that the memory fails;

[0115] A data writing module 902 is used to select a target page from a standby page that does not store data, and write the mirror data corresponding to the faulty page into the target page when data is stored in the faulty page;

[0116] The redirection module 903 is used to redirect the address of the faulty page to the address of the target page.

[0117] As can be seen from the above, in the embodiment of the present invention, the storage space of the memory is divided into different pages. When a fault occurs in the memory, the fault page where the fault occurs can be determined. Since the storage unit of the processor records the mirror data, the backup of the data in the memory is achieved. Therefore, when a fault page fails, the data in the backup fault page can be stored in the target page, and the address of the fault page can be redirected to the address of the target page, which is equivalent to using the target page instead of the fault page. When the fault page needs to be accessed later, the access will be redirected to the target page that is not faulty, and the fault is handled. In addition, the fault handling is performed in pages. During the fault handling process, only the fault page needs to be redirected, and the entire chip does not need to be reset, that is, during this period, the work of other pages in the chip's memory except the fault page will not be affected. Therefore, while the fault handling of the memory is achieved through the embodiment of the present invention, the robustness of the chip can also be improved.

[0118] In one embodiment of the present invention, the device further comprises:

[0119] A data write-back module, used for writing the mirror data corresponding to the faulty page back to the faulty page;

[0120] The fault judgment module is used to judge whether the fault continues to occur at the error address in the faulty page after writing back; if so, trigger the execution of the data writing module 902.

[0121] As can be seen from the above, in the embodiment of the present invention, before using the target page to replace the faulty page, you can first try to use data writeback to eliminate the fault in the faulty page caused by reasons other than the memory itself. If the fault can be eliminated by this method, there is no need to use the target page to replace the faulty page. This can avoid directly using the target page to replace the faulty page, resulting in the direct abandonment of the faulty page with no fault in its own data storage capacity, resulting in a waste of storage space.

[0122] In one embodiment of the present invention, the data write-back module is specifically used to:

[0123] The mirror data corresponding to the row where the error address is located is written back to the row in the faulty page.

[0124] As can be seen from the above, in the embodiment of the present invention, only part of the data in the faulty page is written back, thereby reducing the amount of write-back data and achieving rapid processing of the fault.

[0125] In one embodiment of the present invention, the device further comprises:

[0126] The page removal module is used to remove the page out of the standby page if the faulty page to which the faulty address belongs belongs to the standby page.

[0127] As can be seen from the above, the solution provided in the embodiment of the present invention can also perform fault detection on the standby page. If the faulty page is detected to be a standby page, the faulty page is moved out of the standby page to prevent the standby page from being used for data storage later, resulting in storage failure.

[0128] In one embodiment of the present invention, it is determined that the memory fails in the following cases:

[0129] Receiving first fault information reported by a memory built-in self-test mbist in the memory, wherein the first fault information is reported when a memory fault is detected by mbist during the initialization of a chip in which the memory is located and the fault cannot be repaired;

[0130] and / or

[0131] During the operation of the chip, the number of times of receiving error checking and correcting ECC error information reported by the same basic addressing unit reaches a preset number.

[0132] The embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.

[0133] Memory 1003, used for storing computer programs;

[0134] The processor 1001 is used to implement the above-mentioned memory failure processing method when executing the program stored in the memory 1003.

[0135] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0136] The communication interface is used for communication between the above electronic device and other devices.

[0137] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0138] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0139] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned memory fault handling methods are implemented.

[0140] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any one of the memory fault processing methods in the above embodiments.

[0141] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0142] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0143] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0144] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for handling memory failure, It is characterized in that The storage space of the memory is divided into different pages, and the storage unit of the processor controlling the memory records the mirror data of the data stored in the memory, which is applied to the processor, and the method includes: In the case where it is determined that the memory fails, determining a faulty page to which the faulty address belongs; In the case where data is stored in the faulty page, a target page is selected from the standby pages that do not store data, and the mirror data corresponding to the faulty page is written from the processor into the target page; The address of the faulty page is redirected to the address of the target page.

2. The method according to claim 1, It is characterized in that Before selecting a target page from pages that do not store data and writing the mirror data corresponding to the faulty page into the target page, the method further includes: Writing the mirror data corresponding to the faulty page back to the faulty page; Determine whether a fault continues to occur at the error address in the faulty page after writing back; If so, the step of selecting a target page from the pages that do not store data and writing the mirror data corresponding to the faulty page into the target page is performed.

3. The method according to claim 2, It is characterized in that Writing back the mirror data corresponding to the faulty page to the faulty page includes: The mirror data corresponding to the row where the error address is located is written back to the row in the faulty page.

4. The method according to claim 1, It is characterized in that The method further comprises: If the faulty page to which the faulty address belongs belongs to is a standby page, the page is moved out of the standby page.

5. The method according to any one of claims 1 to 4, It is characterized in that The memory is determined to be faulty when: receiving first fault information reported by a memory built-in self-test mbist in the memory, wherein the first fault information is reported when a memory fault is detected by mbist during the initialization of a chip in which the memory is located and the fault cannot be repaired; and / or During the operation of the chip, the number of times of receiving error checking and correcting ECC error information reported by the same basic addressing unit reaches a preset number.

6. A memory fault processing device, It is characterized in that The storage space of the memory is divided into different pages, and the storage unit of the processor controlling the memory records the mirror data of the data stored in the memory, which is applied to the processor, and the device includes: A paging determination module, for determining a faulty page to which an erroneous address of the fault belongs when it is determined that the memory has failed; A data writing module, configured to select a target page from a standby page that does not store data, and write the mirror data corresponding to the faulty page from the processor into the target page when data is stored in the faulty page; The redirection module is used to redirect the address of the fault page to the address of the target page.

7. The device according to claim 6, It is characterized in that The device also includes: A data write-back module, used for writing the mirror data corresponding to the faulty page back to the faulty page; The fault judgment module is used to judge whether the fault continues to occur at the error address in the faulty page after writing back; if so, trigger the execution of the data writing module.

8. The device according to claim 7, It is characterized in that The data write-back module is specifically used for: The mirror data corresponding to the row where the error address is located is written back to the row in the faulty page.

9. The device according to claim 6, It is characterized in that The device also includes: The page removal module is used to remove the page out of the standby page if the faulty page to which the faulty address belongs belongs to the standby page.

10. The device according to any one of claims 6 to 9, It is characterized in that The memory is determined to be faulty when: receiving first fault information reported by a memory built-in self-test mbist in the memory, wherein the first fault information is reported when a memory fault is detected by mbist during the initialization of a chip in which the memory is located and the fault cannot be repaired; and / or During the operation of the chip, the number of times of receiving error checking and correcting ECC error information reported by the same basic addressing unit reaches a preset number.

11. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.

12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.