Memory failure region marking and shielding multiplexing method and system based on lpddr5 chip unique identification

By comparing and verifying the chip's unique identifier and the failure area mapping table during the system startup phase of the LPDDR5 memory chip, and dynamically calculating the physical address to be masked, the problem of wasted resources and inconsistent address decoding caused by partial failure of the LPDDR5 memory chip is solved, achieving efficient utilization of memory resources and cost reduction.

CN123138147APending Publication Date: 2026-11-20SHENZHEN RAYSON TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611624901.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-20
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In existing technologies, LPDDR5 memory chips have localized failure areas due to process fluctuations during manufacturing, resulting in a waste of the entire memory resource. The testing phase lacks fine-grained failure area data, the system startup phase lacks reliable failure area mapping, and address decoding is inconsistent under different capacities, leading to low resource utilization and high hardware costs.

Method used

By reading the mode register of the LPDDR5 memory chip during the system startup phase to obtain the chip's unique identifier, and comparing it with the failure area mapping table in the non-volatile storage medium and performing CRC32 integrity verification, the set of physical addresses to be masked is dynamically calculated, and failure areas are excluded during initialization. By using the parsed failure area index information combined with the LPDDR5 physical address mapping rules, fine-grained memory degradation and reuse can be achieved.

Benefits of technology

It enables fine-grained marking and masking of failure areas in LPDDR5 memory chips, improving memory resource utilization, reducing hardware costs, and adapting to different specifications of LPDDR5 chips, thus solving the problem of poor address decoding flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138147A_ABST
    Figure CN123138147A_ABST
Patent Text Reader

Abstract

The application discloses a memory invalid region marking and shielding multiplexing method and system based on an LPDDR5 chip unique identifier, and relates to the technical field of computer memory management. In the test phase, read-write verification tests are performed on the LPDDR5 memory chip according to chip selection, memory banks and block granularity, address decoding is performed on failed physical addresses, and an invalid region mapping table bound with the chip unique identifier is generated; in the download configuration phase, the corresponding mapping table is retrieved and written according to the chip unique identifier; in the system startup phase, the chip unique identifier and the mapping table are read, CRC32 integrity verification and identifier comparison are performed, the invalid region index is parsed, and a physical address set to be shielded is reconstructed according to the LPDDR5 physical address mapping rule. For non-2 integer power capacity, the address bit width is determined by rounding up, and the invalid blocks beyond the actual effective range are cut, so that the same address decoding logic can adapt to various capacity specifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer memory management technology, specifically to a memory failure region masking and reuse method based on the unique identifier of LPDDR5 chip, a memory failure region marking method, a failure region mapping table download and configuration method, a memory failure region marking and masking reuse system, electronic device, and computer-readable storage medium. Background Technology

[0002] With the continuous growth in demand for memory capacity and bandwidth from applications such as mobile terminals, automotive electronics, and edge computing, low-power LPDDR5 (double data rate synchronous dynamic random access memory) has become a commonly used memory solution. During the manufacturing process of LPDDR5 memory chips, factors such as process fluctuations, lithography defects, or particle contamination may cause some memory cells, rows, or columns to fail, forming "failure areas".

[0003] In existing technologies, post-package repair (PPR) is typically used to repair defective LPDDR5 memory chips, replacing some faulty rows with limited redundant resources. However, when the number of faulty regions is large or their distribution is wide, PPR struggles to cover all faulty regions, potentially rendering the entire chip unusable. Furthermore, conventional memory testing usually focuses on providing a "pass / fail" conclusion for the entire chip, lacking fine-grained fault location data directly usable during runtime. There is also a lack of a persistent and verifiable fault region data contract between the testing and system startup phases, bound to the chip's identity. Additionally, different chip capacities correspond to different address geometry parameters, especially for capacities such as 3GB and 6GB (non-powers of 2). Decoding with a fixed address width can easily lead to inconsistencies between the theoretical and actual effective address spaces. Therefore, a closed-loop solution is needed that can create fine-grained fault region markers during testing, match mapping data according to the chip's unique identifier during download, and verify and mask faulty addresses during system startup. Summary of the Invention

[0004] The main objective of this application is to provide a memory failure region masking and reuse method based on the unique identifier of the LPDDR5 chip, a memory failure region marking method, a failure region mapping table download and configuration method, and a memory failure region marking and masking reuse system, electronic device, and computer-readable storage medium. This aims to solve technical problems such as the waste of the entire memory resource due to partial failures, the lack of a unified failure region data contract between the test end and the operation end, and the difficulty in uniformly processing address decoding under different capacities. This enables LPDDR5 memory chips with partial failure regions to continue to use their remaining available address space after excluding the failed addresses.

[0005] To achieve the above objectives, this application adopts the following technical solution: According to a first aspect of this application, a method for masking and reusing memory failure regions based on the unique identifier of an LPDDR5 chip is provided, executed by a processor, wherein the processor is communicatively connected to the LPDDR5 memory chip and a non-volatile storage medium, comprising: During the system startup phase, basic initialization is performed on the LPDDR5 memory chip to enable reading of the mode register; Read the stored values ​​of multiple preset mode registers of the LPDDR5 memory chip, and obtain the chip unique identifier of the LPDDR5 memory chip based on the stored values ​​of the multiple preset mode registers; Read the failure region mapping table corresponding to the LPDDR5 memory chip from the non-volatile storage medium. The failure region mapping table includes at least a chip unique identifier field, a block size field, failure region index information, and a check value field. The integrity of the data in the failure area mapping table is verified based on the verification value field, and the read chip unique identifier is compared with the chip unique identifier field. If the data integrity verification passes and the chip unique identifier matches the chip unique identifier field, the failure area index information is parsed to obtain the chip select identifier, memory index and block index corresponding to each failure area; Based on the chip select identifier, the memory bank index, the block index, the block size, and the preset LPDDR5 physical address mapping rules, determine the set of physical addresses to be masked corresponding to each of the failed regions; During the initialization and available memory configuration of the LPDDR5 memory chip, the set of physical addresses to be masked is excluded from the available address space, and the available address space after excluding the set of physical addresses to be masked is reported to the operating system.

[0006] Furthermore, the verification value field is a CRC32 verification value; The step of verifying the data integrity of the failure area mapping table based on the verification value field includes: Perform CRC32 calculation on all fields in the failure area mapping table except for the check value field to obtain the current CRC32 check value; The current CRC32 check value is compared with the CRC32 check value stored in the failure area mapping table; If both conditions are met, the failure area mapping table is determined to have passed the data integrity check.

[0007] Furthermore, the preset LPDDR5 physical address mapping rule is used to determine at least the column address field, channel address field, memory bank group address field, memory bank address field, and row address field in the physical address; The address width parameter is determined based on the single-chip selected capacity, and the width of the row address field is determined based on the address width parameter. Based on the physical address mapping rules, the chip select identifier, the memory index, and the block index, the physical address belonging to the corresponding failure region is determined, instead of directly converting the block index into a single continuous address range.

[0008] According to a second aspect of this application, a method for marking memory failure areas based on the unique identifier of an LPDDR5 chip is provided, executed by a test device, comprising: Obtain the single-chip select capacity of the LPDDR5 memory chip to be tested; The LPDDR5 memory chip is subjected to read / write verification tests at three levels: chip select, memory bank, and block, and the physical addresses corresponding to read / write verification failures are recorded. The address width parameter is determined based on the single chip select capacity, and the physical address is decoded according to the preset LPDDR5 physical address mapping rules to obtain the chip select identifier, channel address, memory bank group address, memory bank address, row address and column address corresponding to the physical address; The memory bank index is determined based on the memory bank group address and the memory bank address, and the block index is determined based on the preset high-order bits in the row address; The set of failed regions is determined based on the chip select identifier, storage bank index, and block index corresponding to each physical address that failed read / write verification. Read the unique chip identifier of the LPDDR5 memory chip; A failure region mapping table is generated based on the chip's unique identifier, the set of failure regions, and the block size determined by the single-chip selected capacity. The failure region mapping table includes at least a chip unique identifier field, a block size field, a failure region quantity field, failure region index information, and a check value field.

[0009] Further, the step of determining the address width parameter based on the single-chip select capacity and decoding the physical address includes: The corresponding address width parameter is obtained by taking the logarithm to the base 2 of the single-chip select capacity and rounding it up. The chip select identifier is determined based on the offset of the physical address relative to the starting position of the LPDDR5 memory chip address space and the single chip select capacity; The offset is modulo the single chip select capacity to obtain the local address inside the chip select. Based on the address width parameter and the preset address field offsets, the channel address, memory group address, memory address, row address, and column address are parsed from the local address within the chip select.

[0010] Furthermore, when the single-chip select capacity is not an integer power of 2, the actual effective address range is determined based on the single-chip select capacity; Blocks that exceed the actual effective address range within the theoretical address range formed by the address bit width parameter obtained by rounding up are determined as invalid blocks; The invalid blocks are excluded when generating the set of failed regions.

[0011] According to a third aspect of this application, a method for downloading and configuring a failure region mapping table based on the unique identifier of an LPDDR5 chip is provided, which is executed by a processor and a download tool, including: After the processor completes the basic initialization to be able to read the mode register of the LPDDR5 memory chip, it reads the mode registers MR47 to MR54 of the LPDDR5 memory chip and obtains the chip's unique identifier based on the reading results. The processor sends the chip's unique identifier to the download tool via a communication interface; The download tool uses the chip's unique identifier as the search key to search for a failure area mapping table corresponding to the chip's unique identifier in a preset database. When the corresponding failure area mapping table is found, the found failure area mapping table is sent to the processor; The processor writes the received failure region mapping table into a non-volatile storage medium for subsequent system startup phase reading and failure region masking.

[0012] According to the fourth aspect of this application, a memory failure area marking and masking reuse system based on the unique identifier of an LPDDR5 chip is provided, including an LPDDR5 memory chip, testing equipment, downloading tool, non-volatile storage medium and processor; The testing equipment is used to perform read and write verification tests on the LPDDR5 memory chip according to the three-level granularity of chip select, memory bank and block. The physical address corresponding to the read and write verification failure is decoded. The failure area is determined according to the chip select identifier, memory bank index and block index obtained by decoding, and a failure area mapping table corresponding to the chip unique identifier of the LPDDR5 memory chip is generated. The failure area mapping table includes at least a chip unique identifier field, a block size field, a failure area quantity field, failure area index information, and a CRC32 check value field. The download tool is used to receive the chip's unique identifier read by the processor, use the chip's unique identifier as a search key to search for the corresponding failure area mapping table in a preset database, and send the matched failure area mapping table to the processor. The processor is used to write the failure region mapping table into the non-volatile storage medium, and in the subsequent system startup phase, read the chip unique identifier of the LPDDR5 memory chip and the failure region mapping table in the non-volatile storage medium, and perform CRC32 verification and chip unique identifier comparison on the failure region mapping table. The processor is also configured to, when the CRC32 check passes and the chip unique identifier matches, determine the corresponding set of physical addresses to be masked based on the failure area index information, block size and LPDDR5 physical address mapping rules, exclude the set of physical addresses to be masked during LPDDR5 memory initialization and available memory configuration, and report the remaining available address space to the operating system.

[0013] According to a fifth aspect of this application, an electronic device is provided, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the memory failure region masking and reuse method as described above.

[0014] According to a sixth aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a corresponding processor, it implements the memory failure region masking and reuse method described above, or implements the memory failure region marking method described above, or implements the failure region mapping table download and configuration method described above.

[0015] In the various subjects provided above in this application, by reading the mode register of the LPDDR5 memory chip during the system startup phase to obtain the chip's unique identifier, and comparing it with the identifier in the failure region mapping table stored in the non-volatile storage medium and performing CRC32 integrity verification, the one-to-one correspondence between the mapping table and the specific chip and the data reliability are ensured. This solves the problems of lack of a test-end to runtime contract and unreliable mapping table in the prior art. Based on this, the parsed failure region index information is used in conjunction with LPDDR5 physical address mapping rules to dynamically calculate the set of physical addresses to be masked. During initialization, failure regions are excluded from the available address space, allowing the operating system to access only available normal storage units. This avoids the scrapping of the entire memory chip due to partial failure, achieving fine-grained memory degradation and reuse, significantly improving memory resource utilization and reducing hardware costs. Furthermore, by using a decoding method based on single-chip capacity selection to derive address width parameters, the same code can be adapted to various LPDDR5 chips of different specifications, including those with non-power-of-two capacities, solving the problem of poor address decoding flexibility in existing solutions. Attached Figure Description

[0016] The accompanying drawings are provided to further understand this application, making other features, objects, and advantages of this application more apparent. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating a memory failure region masking and reuse method based on the unique identifier of an LPDDR5 chip, provided in an embodiment of this application.

[0017] Figure 2 This is a flowchart illustrating a memory failure region marking method based on the unique identifier of an LPDDR5 chip, provided in an embodiment of this application.

[0018] Figure 3 This is a flowchart illustrating a method for downloading and configuring a failure region mapping table based on the unique identifier of an LPDDR5 chip, as provided in an embodiment of this application.

[0019] Figure 4 This is a schematic diagram of a memory failure area marking and masking reuse system based on the unique identifier of an LPDDR5 chip, provided in an embodiment of this application.

[0020] Figure 5 This is a schematic diagram of a memory failure region shielding and multiplexing device provided in an embodiment of this application.

[0021] Figure 6 This is a schematic diagram of a memory failure region marking device provided in an embodiment of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0023] This application's embodiments can be applied to computer systems containing LPDDR5 memory chips, such as mobile terminals, automotive electronics, and edge computing devices. Specifically, they can be deployed in system boot firmware, memory testing platforms, download configuration tools, and the underlying memory initialization process of the operating system. The processor involved in this application's embodiments can be a boot processor or application processor in a system-on-a-chip (SoC), and the non-volatile storage medium can be a non-volatile storage device such as an embedded multimedia card (eMMC) or universal flash memory (UFS). The LPDDR5 memory chip can have one or more chip selects (ranks), one or more channels, and multiple memory banks.

[0024] For ease of understanding, the key terms involved in the embodiments of this application will be explained below.

[0025] Chip Unique Identifier: A 64-bit sequence read from the preset mode register inside the LPDDR5 memory chip and concatenated in a preset order, used to identify the current physical chip and establish a corresponding relationship with its failure area mapping table. In this embodiment, the chip unique identifier comes from 8 bytes of data from mode register MR47 to MR54.

[0026] Failure Region Mapping Table: This refers to structured data used to describe the location and related parameters of the failure regions of a certain LPDDR5 memory chip as determined by testing. It can be persistently stored in non-volatile storage media and includes at least a chip unique identifier field, a block size field, a failure region quantity field, failure region index information, and a check value field.

[0027] Chip select identifier: In a multi-chip select memory organization, this identifier is used to distinguish different chip selects (ranks). In address decoding, the chip select identifier can be determined by dividing the offset of the physical address relative to the start of the LPDDR5 memory chip address space by the single chip select capacity.

[0028] Bank index: refers to the number used to identify the bank within the chip select. In this embodiment, the bank index is determined by the bank group address field and the bank address field; the channel address participates in physical address reconstruction as an independent address field in the LPDDR5 physical address mapping, but is not used as an independent encoding dimension of the chip select × bank × block three-level failure region index.

[0029] Block index: refers to the number of the block within a single memory bank, which is divided according to the preset high-order bits of the row address. It is the granular unit for marking and masking the failure area in the embodiments of this application.

[0030] Address bit width parameter: When the single chip select capacity is expressed in bytes, the bit width value is obtained by taking the logarithm of the single chip select capacity to the base 2 and rounding it up. It is used to uniformly determine the bit width of the row address field and the address geometry parameters related to block partitioning.

[0031] Invalid blocks: These are blocks in the theoretical address space where all addresses exceed the actual valid address range, when the single-chip select capacity is not a power of 2, based on the address width parameter obtained by rounding up. These blocks are not written into the invalid region mapping table, nor are they involved in determining the set of physical addresses to be masked.

[0032] Figure 1 This illustration shows a flowchart of a memory failure region masking and reuse method based on the unique identifier of an LPDDR5 chip, provided in an embodiment of this application. Figure 1 As shown, this application provides a memory failure region masking and reuse method based on the unique identifier of an LPDDR5 chip. This method is executed by a processor, which is communicatively connected to the LPDDR5 memory chip and the non-volatile storage medium. The method includes: Step S101: During the system startup phase, perform basic initialization on the LPDDR5 memory chip to enable reading the mode register; Step S102: Read the stored values ​​of multiple preset mode registers of the LPDDR5 memory chip, and obtain the chip unique identifier of the LPDDR5 memory chip based on the stored values ​​of the multiple preset mode registers. Step S103: Read the failure region mapping table corresponding to the LPDDR5 memory chip from the non-volatile storage medium. The failure region mapping table includes at least a chip unique identifier field, a block size field, failure region index information, and a check value field. Step S104: Verify the data integrity of the failure area mapping table based on the verification value field, and compare the read chip unique identifier with the chip unique identifier field; Step S105: If the data integrity verification passes and the chip unique identifier is consistent with the chip unique identifier field, the failure area index information is parsed to obtain the chip select identifier, memory bank index and block index corresponding to each failure area. Step S106: Determine the set of physical addresses to be masked corresponding to each failed region based on the chip select identifier, memory bank index, block index, block size, and preset LPDDR5 physical address mapping rules. Step S107: During the initialization and available memory configuration of the LPDDR5 memory chip, the set of physical addresses to be masked is excluded from the available address space, and the available address space after excluding the set of physical addresses to be masked is reported to the operating system.

[0033] In this embodiment, the above steps constitute a startup processing chain from chip identification, mapping table verification, failure region index parsing to physical address masking. The "basic initialization" in step S101 refers to the initialization process required to make the LPDDR5 memory chip's mode register read path usable. Its purpose is to enable the processor to stably execute mode register read operations, and it is not necessarily equivalent to completing all memory training, capacity configuration, and publishing memory resources to the operating system. After completing steps S102 to S106, the processor can continue to execute complete memory initialization and available memory configuration. Step S105 parses the failure region index into chip select identifier, memory bank index, and block index; step S106 then combines the fixed chip select, memory bank, and block conditions with the remaining variable address fields according to the LPDDR5 physical address mapping rules consistent with the test end to obtain one or more corresponding physical address segments, which constitute the set of physical addresses to be masked. One implementation of step S107 is as follows: First, a list of actual valid physical address segments is formed according to the chip capacity and physical address mapping rules. Then, using the set of physical addresses to be masked as the deduction set, overlapping valid physical address segments are truncated or split, and the portions falling into the set of physical addresses to be masked are deleted. The remaining adjacent address segments are then merged as needed to form a final list of available address space. The boot firmware only provides this list of available address space to the operating system as system available memory information. Therefore, the operating system will not allocate marked invalid physical addresses as available memory.

[0034] Taking a specific application scenario as an example, an edge computing device is equipped with an LPDDR5 memory chip that has a partial failure. After the device is powered on, the processor first executes step S101 to make the mode register read path available; then, in step S102, it reads the 8-byte stored values ​​of mode registers MR47 to MR54 and concatenates them into a 64-bit chip unique identifier according to a preset order. In step S103, the processor reads the failure area mapping table from the device's eMMC. In step S104, the processor calculates the data in the mapping table except for the check value field according to the CRC32 parameters consistent with those of the test end, and compares the calculation result with the CRC32 check value in the mapping table. At the same time, it compares the actually read chip unique identifier with the chip unique identifier field in the mapping table. After both pass, it proceeds to step S105, for example, parsing out failure area entries such as chip select identifier 0, memory bank index 3, and block index 5. In step S106, the processor fixes the address fields corresponding to the chip select, memory bank, and block according to the physical address mapping rules, and restores or enumerates the valid values ​​of address fields such as channel address, column address, and intra-block row address according to their valid values, thereby obtaining one or more corresponding physical address segments and forming a set of physical addresses to be masked. Finally, in step S107, the processor deducts the above address segments from the actual effective physical address space, providing only the remaining available address space to the operating system.

[0035] Figure 2 This illustration shows a flowchart of a memory failure region marking method based on the unique identifier of an LPDDR5 chip, according to an embodiment of this application. This method provides the data source for the failure region mapping table for the aforementioned masking and reuse method, and is executed by the test equipment during the chip testing phase. The marking method includes: Step S201: Obtain the single-chip select capacity of the LPDDR5 memory chip to be tested; Step S202: Perform read / write verification tests on the LPDDR5 memory chip according to the three-level granularity of chip select, memory bank, and block, and record the physical address corresponding to the read / write verification failure. Step S203: Determine the address bit width parameter based on the single chip select capacity, and decode the physical address according to the preset LPDDR5 physical address mapping rules to obtain the chip select identifier, channel address, memory bank group address, memory bank address, row address, and column address. Step S204: Determine the memory bank index based on the memory bank group address and the memory bank address, and determine the block index based on the preset high-order bits of the row address; Step S205: Determine the set of failed regions based on the chip select identifier, storage bank index, and block index corresponding to each physical address that failed read / write verification; Step S206: Read the unique chip identifier of the LPDDR5 memory chip; Step S207: Generate a failure region mapping table based on the chip's unique identifier, the set of failure regions, and the block size determined by the single chip select capacity. The failure region mapping table includes at least a chip unique identifier field, a block size field, a number of failure regions field, failure region index information, and a checksum field. Since this embodiment adopts a three-level failure granularity of chip select × memory bank × block, the channel address is not written separately into the failure region index, but participates in the reconstruction of the physical address set to be masked at the runtime end according to the same physical address mapping rules as the test end.

[0036] Figure 3 This illustration shows a flowchart of a method for downloading and configuring a failure region mapping table based on the unique identifier of an LPDDR5 chip, according to an embodiment of this application. The method is executed by a processor and a download tool, and includes: Step S301: After the processor completes the basic initialization to be able to read the LPDDR5 memory chip mode register, it reads the LPDDR5 memory chip mode registers MR47 to MR54 and obtains the unique chip identifier of the LPDDR5 memory chip based on the reading result. In step S302, the processor sends the chip's unique identifier to the download tool via the communication interface; Step S303: The download tool uses the chip's unique identifier as the search key to search for the failure area mapping table corresponding to the chip's unique identifier in the preset database. Step S304: When the corresponding failure area mapping table is found, the found failure area mapping table is sent to the processor; In step S305, the processor writes the received failure region mapping table into a non-volatile storage medium for subsequent system startup phase reading and execution of failure region masking. The download configuration phase typically occurs during system production or deployment. Step S301 requires the mode register read path to be available; this state can be achieved either through basic initialization capable of performing MRR or after complete DRAM initialization has been completed during production testing. Therefore, it does not contradict the masking multiplexing process executed according to S101–S107 during the subsequent normal startup phase.

[0037] Figure 4 This illustration shows a schematic diagram of a memory failure region marking and masking reuse system based on the unique identifier of an LPDDR5 chip, provided in an embodiment of this application. Figure 4As shown, the system includes an LPDDR5 memory chip 10, a testing device 20, a download tool 30, a non-volatile storage medium 40, and a processor 50. The testing device 20 performs read / write verification tests on the LPDDR5 memory chip 10 at a three-level granularity: chip select, memory bank, and block. It decodes the physical addresses corresponding to read / write verification failures, determines the failed regions based on the decoded chip select identifier, memory bank index, and block index, and generates a failed region mapping table corresponding to the unique chip identifier of the LPDDR5 memory chip 10. This failed region mapping table includes at least a chip unique identifier field, a block size field, a number of failed regions field, failed region index information, and a CRC32 checksum field. The download tool 30 receives the chip unique identifier read by the processor 50, uses the chip unique identifier as a search key to search for the corresponding failed region mapping table in a preset database, and sends the matched failed region mapping table to the processor 50. Processor 50 is used to write the failure region mapping table into non-volatile storage medium 40, and during the subsequent system startup phase, it reads the chip unique identifier of LPDDR5 memory chip 10 and the failure region mapping table in non-volatile storage medium 40, and performs CRC32 verification and chip unique identifier comparison on the failure region mapping table. Processor 50 is also used to determine the corresponding set of physical addresses to be masked based on the failure region index information, block size, and LPDDR5 physical address mapping rules, provided that the CRC32 verification passes and the chip unique identifier comparison matches. During LPDDR5 memory initialization and available memory configuration, the set of physical addresses to be masked is excluded, and the remaining available address space is reported to the operating system. In this system, test device 20, download tool 30, and processor 50 correspond to the three stages of test marking, download matching, and startup masking, respectively. These three are interconnected through a unified data contract of the failure region mapping table, forming an end-to-end closed loop from chip defect detection to operational masking multiplexing.

[0038] Figure 5 A schematic diagram of a memory failure region shielding and multiplexing device provided in an embodiment of this application is shown. Figure 5As shown, the device includes: a basic initialization module 60, used to perform basic initialization of the LPDDR5 memory chip during the system startup phase to enable reading of mode registers; a unique identifier reading module 61, used to read multiple preset mode registers of the LPDDR5 memory chip and obtain the chip's unique identifier based on the reading results; a mapping table reading module 62, used to read the failure region mapping table corresponding to the LPDDR5 memory chip from the non-volatile storage medium; a verification module 63, used to perform data integrity verification on the failure region mapping table and compare the read chip unique identifier with the chip unique identifier field in the failure region mapping table; a failure address determination module 64, used to determine the set of physical addresses to be masked based on the failure region index information, block size, and LPDDR5 physical address mapping rules in the failure region mapping table if the data integrity verification passes and the chip unique identifier matches; and a masking and multiplexing module 65, used to exclude the set of physical addresses to be masked during the initialization and available memory configuration of the LPDDR5 memory chip and report the remaining available address space to the operating system. The collaboration timing between the modules of the device corresponds one-to-one with the processing logic of steps S101 to S107 in the method flow. The basic initialization module 60 provides the prerequisite for the mode register to be readable for the unique identifier reading module 61. The unique identifier reading module 61 and the mapping table reading module 62 respectively obtain the actual identity of the chip and the stored mapping data. After the verification module 63 completes the double-layer verification, the failure address determination module 64 performs the conversion calculation from index to physical address. The masking and multiplexing module 65 completes the final memory space trimming and reporting.

[0039] Figure 6 A schematic diagram of a memory failure region marking device provided in an embodiment of this application is shown. Figure 6 As shown, the device includes: a test module 70, used to perform read / write verification tests on LPDDR5 memory chips at a three-level granularity of chip select, memory bank, and block, and record the physical addresses corresponding to read / write verification failures; an address decoding module 71, used to determine the address bit width parameters based on the single chip select capacity of the LPDDR5 memory chip, and decode the physical address according to the LPDDR5 physical address mapping rules to obtain the chip select identifier, channel address, memory bank group address, memory bank address, row address, and column address; a failure region determination module 72, used to determine the memory bank index based on the memory bank group address and memory bank address, determine the block index based on the preset high-order bits of the row address, and determine the failure region based on the chip select identifier, memory bank index, and block index; and a mapping table generation module 73, used to generate a failure region mapping table based on the chip unique identifier of the LPDDR5 memory chip, the failure region, and the block size, and calculate the CRC32 check value corresponding to the failure region mapping table. This device is deployed in test equipment 20, and the functional division of each module is as follows: Figure 2The execution logic of each step in the marking method shown is consistent. The test module 70 is responsible for recording the test execution and failure physical address. The address decoding module 71 completes the parsing of the physical address into logical structure information. The failure area determination module 72 performs three-level granular aggregation and deduplication. The mapping table generation module 73 is responsible for the final structured data output and check value calculation.

[0040] In one embodiment, the check value field in step S104 is a CRC32 check value. Data integrity verification includes: performing CRC32 calculations on the data in the failed region mapping table (excluding the check value field itself) according to a pre-agreed CRC32 parameter set to obtain the current CRC32 check value; comparing the current CRC32 check value with the CRC32 check values ​​stored in the mapping table; and determining that the mapping table passes the data integrity verification when they match. The mapping table generated at the test end and the verification mapping table at the running end use the same CRC32 generator polynomial, initial value, input / output reflection settings, final XOR value, and byte order to ensure that the calculation results at both ends can be directly compared. CRC32 provides strong detection capabilities for common single-bit, multi-bit, truncated, or overwritten data errors, thereby reducing the risk of error masking based on a corrupted mapping table. However, this application does not describe CRC32 as being collision-free for any error. In one implementation, the chip unique identifier field, block size field, number of failed regions field, and failed region index information of the mapping table are sequentially used in CRC32 calculation, and the calculation result is written to the check value field. If the runtime verification fails, the mapping table is not used to continue to perform failed address masking, and the preset error handling path is entered.

[0041] In one embodiment, the multiple preset mode registers in step S102 include mode registers MR47 to MR54 of the LPDDR5 memory chip. After the mode register read path becomes available, the processor sequentially reads MR47 to MR54, reading 1 byte of data each time, accumulating to 8 bytes of data, and then concatenates them into a 64-bit unique chip identifier according to the byte order agreed upon by the test and operation ends. This identifier is used to distinguish the current LPDDR5 memory chip and serves as the basis for identity matching in finding and verifying the failure region mapping table. During the normal startup phase, mode register reading can be performed after the basic initialization described in S101; during the production download configuration phase, if the platform process has completed full DRAM initialization, MR47 to MR54 can also be read in this state. Both scenarios assume that the mode register reading can be executed stably.

[0042] In one embodiment, for the LPDDR5 physical address mapping rule in step S106, the physical address is at least resolved into a column address field, a channel address field, a bank group address field, a bank address field, and a row address field. Taking the address bit numbering method of this embodiment as an example, burst occupies bits 1 to 4, column address C[6:4] occupies bits 5 to 7, channel address occupies bit 8, bank group address bg0 occupies bit 9, column address C[9:7] occupies bits 10 to 12, bank group address bg1 occupies bit 13, bank address occupies bits 14 to 15, and the row address field extends from bit 16 to bit cs_shift-1. The single-chip select capacity rank_size is represented in bytes, the address bit width parameter cs_shift=ceil(log2(rank_size)), and the row address bit width is cs_shift-16. The bank group address consists of a 2-bit BG value (bg1 and bg0), and the bank address is a 2-bit BA value. In an example where each chip select contains 16 banks, a bank index of 0 to 15 can be formed using "bank index = (BG << 2) | BA". The highest 4 bits of the row address are used as the block index, thus forming 16 blocks within each bank. The corresponding theoretical block size is obtained by dividing the theoretical single-chip select address space by 16 banks and 16 blocks. Byte; equivalently, when measured in MB, it can be written as MB. For capacities that are powers of 2, the theoretical block size is consistent with the actual block size. For capacities that are not powers of 2, such as 3GB and 6GB, the block granularity is still determined by rounding up the theoretical address space, and blocks exceeding the actual effective address range are removed by invalid block pruning. After the runtime recovers the chip select identifier, memory bank index, and block index according to the failure region index, it recovers BG and BA according to the above mapping rules and fixes the highest 4 bits of the row address. Since the failure granularity in this embodiment is chip select × memory bank × block, the channel address is not separately entered into the failure region index. Therefore, the channel address, column address, burst, and the lower bits of the intra-block row address belong to the variable address fields within the failure region. The processor combines these variable fields within the actual effective value range and fills each field into the corresponding physical address bits to obtain the physical address belonging to the failure region. The obtained addresses are merged according to continuity to obtain one or more physical address segments to be masked. This reverse reconstruction process uses the same physical address mapping rule as the forward address decoding of the test end, thereby ensuring that the failure index is consistent with the masked address of the runtime.

[0043] In one embodiment, the bank index is determined by the bank group address field and the bank address field, while the block index is determined by the preset high-order bits of the row address field. In the example of 2-bit BG and 2-bit BA, the bank index can be formed by concatenating BG and BA, resulting in 16 possible values; the channel address remains an independent physical address field and is not included in the chip select × bank × block three-level failure index. When the block index uses the highest 4 bits of the row address, each bank forms 16 blocks. The remaining row address bits, column address, burst, and channel address within the block jointly determine the total physical addresses covered by that block. The test end uses the same bank index encoding and block partitioning rules when generating the failure index as the runtime end when parsing the failure index.

[0044] In one embodiment, the failure region mapping table also includes a failure region quantity field; each failure region index in the failure region index information is used to represent the chip select identifier, memory bank index, and block index of the corresponding failure region. When each chip select corresponds to 16 memory banks and each memory bank is divided into 16 blocks, the failure region index is encoded according to "chip select identifier × 256 + block index × 16 + memory bank index". For a single chip select, the encoding range within the chip select is 0 to 255; when multiple chip selects exist, different chip selects occupy encoding intervals with a step size of 256, for example, chip select 1 corresponds to 256 to 511. The test equipment compresses the three-dimensional identifier into an integer index according to the above formula, and the runtime can recover the chip select identifier, block index, and memory bank index through integer division and modulo operations. This encoding method, in conjunction with the failure region quantity field, enables the mapping table to record failure locations with a space proportional to the actual number of failure regions.

[0045] In one embodiment, when the single-chip select capacity of the LPDDR5 memory chip is not a power of 2, the actual effective address range is determined based on the single-chip select capacity, and blocks formed under the rounded-up address width parameter but falling entirely outside the actual effective address range are determined as invalid blocks. The single-chip select capacity is expressed in bytes when calculating the address width. Taking a 3GB single-chip select capacity as an example... Bytes, log2(rank_size)=30+log2(3)≈31.585, rounded up to get cs_shift=32, corresponding to a theoretical single-chip address space of 2^32 bytes, i.e. 4GB. If each memory bank is divided into 16 blocks according to the highest 4 bits of the row address, then theoretically each block size is... The actual capacity is 16MB. Since the actual capacity is only 3 / 4 of the theoretical capacity, under this example's uniform high-order block partitioning, the first 12 blocks in each memory bank fall within the actual effective address range, while blocks 12 to 15 fall within the top empty address range and should be identified as invalid blocks. The test server does not record these invalid blocks when forming the set of invalid regions, and the runtime server does not include them in the set of physical addresses to be masked. For other capacities other than powers of 2, such as 6GB, cs_shift is calculated first based on the number of bytes, and then invalid blocks in the theoretical space are trimmed according to the actual effective address range.

[0046] In one embodiment, the address decoding process in step S203 includes: obtaining the single chip select capacity rank_size in bytes and calculating cs_shift = ceil(log2(rank_size)); determining the chip select identifier by dividing rank_size by offset of the physical address relative to the starting position of the LPDDR5 memory chip address space, and obtaining the chip select internal local address by taking the modulo of offset by rank_size; subsequently extracting the channel address, memory bank address, memory bank address, row address, and column address from the chip select internal local address according to a preset bit offset. For capacities that are not powers of 2, the bit fields are still parsed according to the theoretical space corresponding to cs_shift, but after obtaining the block index, it is further determined whether the block belongs to an invalid block based on the actual effective address range. In this way, the test end only needs to obtain the single chip select capacity and the physical address mapping rules consistent with the platform to use the same decoding process to handle different capacity specifications.

[0047] In one embodiment, the read / write verification test in step S202 mentioned above includes at least one of the March test mode, pseudo-random test mode, and address test mode. Test data corresponding to the test mode is written to each block to be tested, and the test data is read back. The read-back data is compared with the written data. When the read-back data and written data of a corresponding block are inconsistent, the block is identified as a failure area. In this embodiment, the March test mode, by writing to the storage unit in a specific order and reading back in reverse, can effectively detect various storage unit failure types such as fixed failures, conversion failures, and coupling failures. The pseudo-random test mode, by writing a pseudo-random data sequence to the storage unit and reading back for comparison, has high sensitivity to data retention characteristics and inter-bit interference. The address test mode, by writing address-related feature data, can detect problems such as address decoding errors and address line short circuits. The test device 20 organizes the above tests with blocks as the smallest unit, and performs a complete write, read-back, and comparison process within the address range covered by any block. The beneficial effect of combining at least one of the aforementioned test modes is that it can cover defects caused by different failure mechanisms, improve the detection rate of failure areas, and reduce the probability of defective chips flowing into subsequent stages due to insufficient test coverage. As a specific implementation, the test equipment 20 sequentially executes the March C-test mode for each block, that is, performs multiple write and read operations in a specific address incrementing and decrementing order. The data mode of each write alternates to fully stimulate the state flip of the memory cells, thereby identifying weakly failing cells that are difficult to expose under normal access modes. Furthermore, when any address within the corresponding block shows inconsistency in any read comparison, subsequent test operations for that block are stopped and the block is marked as a failure area, saving test time and accelerating the overall test progress.

[0048] In one embodiment, regarding the reading of the chip's unique identifier and the calculation of the checksum field in steps S206 and S207 mentioned above, the chip's unique identifier is formed by concatenating 8 bytes of data obtained from reading the mode registers MR47 to MR54 of the LPDDR5 memory chip in a preset order; the checksum field is obtained by performing a CRC32 calculation on all fields in the failure area mapping table except for the checksum field. In this embodiment, after determining all failure areas, the test device 20 obtains the 8-byte unique identifier of the chip under test by reading the mode registers MR47 to MR54 and fills it into the chip's unique identifier field in the mapping table, ensuring the binding relationship between the marker data and the specific chip. The calculation of the checksum field is the same as the CRC32 calculation logic used in step S104 of the previous running phase, that is, performing a CRC32 calculation on all fields in the mapping table except for the checksum field, and writing the result into the checksum field at the end of the mapping table. The beneficial effect of this symmetrical design is that the verification algorithm generated by the test end is completely consistent with the verification algorithm of the running end, avoiding abnormal verification pass rates caused by inconsistencies between the two algorithms. As a specific implementation method, after the test device 20 completes the filling of the failure area index information sequence, it sends the chip unique identifier field, block size field, failure area quantity field and failure area index information into the CRC32 calculation function in a predetermined byte order. After the calculation is completed, the result is appended to the check value field of the mapping table in a fixed byte order. Finally, the entire mapping table is serialized and output and uploaded to the preset database for the download tool 30 to retrieve and call during the production deployment stage.

[0049] In one embodiment, the masking and reuse method, marking method, and download configuration method of this application can all be implemented using a layered architecture. As a specific implementation, this layered architecture consists of, from top to bottom, an application layer, an algorithm layer, a memory access layer, a report layer, an index processing layer, an address layer, and a platform layer. The running state of each layer is encapsulated in a structure, passed between layers via structure pointers, without setting file-level global variables. Specifically, the application layer is responsible for organizing the overall process, including the main process scheduling for masking and reuse during the startup phase, the test marking process scheduling, and the download configuration process scheduling; the algorithm layer carries the core algorithm logic such as the March-type test algorithm, the CRC32 check algorithm, and the physical address mapping rules; the memory access layer encapsulates the reading of the mode register and data read / write access of the LPDDR5 memory chip; the report layer is responsible for the formatted output and recording of test results and the failure region mapping table; the index processing layer is responsible for the encoding and parsing of the failure region index; the address layer performs physical address decoding and calculation of the set of physical addresses to be masked; and the platform layer encapsulates the interaction differences with the operating system, non-volatile storage media, and communication interfaces.

[0050] As can be seen from the above embodiments, this application establishes a complete data association from test marking, download matching to startup masking and multiplexing through the unique chip identifier of the LPDDR5 memory chip. During the testing phase, failure regions are located at a three-level granularity of chip select × memory bank × block based on the single chip select capacity and physical address mapping rules. The failure region index, block size, and CRC32 check value are written into a failure region mapping table bound to the chip's unique identifier. During the download configuration phase, the chip's unique identifier is used as the retrieval key to match the mapping table from a preset database and write it to the non-volatile storage medium. During the system startup phase, CRC32 integrity verification and chip unique identifier comparison are performed on the mapping table. Then, one or more physical address segments to be masked are reconstructed according to the address mapping rules consistent with the test end, and these address segments are deducted from the actual effective address space. By representing the single chip select capacity in bytes and using an address width parameter that is rounded up, capacities of 1GB, 1.5GB, 2GB, 3GB, 4GB, 6GB, and 8GB can be uniformly processed. Furthermore, invalid block pruning avoids mismarking or mismasking when the theoretical address space exceeds the actual capacity.

[0051] This application embodiment also provides a memory failure region masking and reuse device. The device includes: a basic initialization module 60, used to perform basic initialization on the LPDDR5 memory chip during system startup to enable reading mode registers; a unique identifier reading module 61, used to read multiple preset mode registers of the LPDDR5 memory chip and obtain the chip's unique identifier based on the reading results; a mapping table reading module 62, used to read the failure region mapping table corresponding to the LPDDR5 memory chip from a non-volatile storage medium; a verification module 63, used to perform data integrity verification on the failure region mapping table and compare the read chip unique identifier with the chip unique identifier field in the failure region mapping table; a failure address determination module 64, used to determine the set of physical addresses to be masked based on the failure region index information, block size, and LPDDR5 physical address mapping rules in the failure region mapping table, provided that the data integrity verification passes and the chip unique identifier comparison matches; and a masking and reuse module 65, used to exclude the set of physical addresses to be masked during the initialization and available memory configuration process of the LPDDR5 memory chip and report the remaining available address space to the operating system. Each module of the device corresponds to the processing logic executed in steps S101 to S107 of the aforementioned method embodiment. The timing cooperation and data flow between modules are related to this. Figure 1 The process is the same as described above and will not be repeated here. This device can complete the entire process of chip identification, mapping data verification, and fault address pruning in the early stages of system startup, so that the operating system can only obtain normal and usable memory space, thereby ensuring that LPDDR5 chips with partial failures can be stably reused in various embedded systems.

[0052] This application also provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the above-described memory failure region masking and reuse method. The processor may be a boot processor or application processor in a system-on-a-chip, and the memory may be a non-volatile storage medium, random access memory, or a combination thereof. During the startup phase, this electronic device can automatically read the unique chip identifier of the LPDDR5 memory chip, verify and parse the failure region mapping table, calculate the set of physical addresses to be masked, and exclude them from the available address space. This allows the operating system to manage only the remaining normal memory space, ensuring the stability of device operation and achieving effective utilization of defective LPDDR5 memory chips.

[0053] This application also provides a computer-readable storage medium storing a computer program. When executed by a corresponding processor, the computer program implements the aforementioned memory failure region masking and reuse method, or the aforementioned memory failure region marking method, or the aforementioned failure region mapping table download and configuration method. The computer-readable storage medium can be any medium capable of persistently storing the program, such as flash memory, read-only memory, disk, or optical disk. The stored computer program can perform functions such as masking and reuse during the startup phase, failure marking during the testing phase, or mapping table download and matching during the production phase in the corresponding processor environment.

[0054] This application also provides a computer program product, which includes a computer program that, when executed by a corresponding processor, implements the aforementioned memory failure region masking and reuse method, or the aforementioned memory failure region marking method, or the aforementioned failure region mapping table download and configuration method. This computer program product can be distributed to a target device via wired or wireless means, enabling the target device, after installing and running the computer program, to possess the complete processing capability of marking LPDDR5 memory chips with failure regions, downloading and matching mapping tables, and initiating masking and reuse.

[0055] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for masking and reusing memory failure regions based on the unique identifier of an LPDDR5 chip, executed by a processor, wherein the processor is communicatively connected to the LPDDR5 memory chip and a non-volatile storage medium, characterized in that, include: During the system startup phase, basic initialization is performed on the LPDDR5 memory chip to enable reading of the mode register; Read the stored values ​​of multiple preset mode registers of the LPDDR5 memory chip, and obtain the chip unique identifier of the LPDDR5 memory chip based on the stored values ​​of the multiple preset mode registers; Read the failure region mapping table corresponding to the LPDDR5 memory chip from the non-volatile storage medium. The failure region mapping table includes at least a chip unique identifier field, a block size field, failure region index information, and a check value field. The integrity of the data in the failure area mapping table is verified based on the verification value field, and the read chip unique identifier is compared with the chip unique identifier field. If the data integrity verification of the failure area mapping table passes and the chip unique identifier is consistent with the chip unique identifier field, the failure area index information is parsed to obtain the chip select identifier, memory index and block index corresponding to each failure area; Based on the chip select identifier, the memory bank index, the block index, the block size, and the preset LPDDR5 physical address mapping rules, determine the set of physical addresses to be masked corresponding to each of the failed regions; During the initialization and available memory configuration of the LPDDR5 memory chip, the set of physical addresses to be masked is excluded from the available address space, and the available address space after excluding the set of physical addresses to be masked is reported to the operating system.

2. The memory failure region masking and reuse method according to claim 1, characterized in that, The verification value field is a CRC32 verification value; The step of verifying the data integrity of the failure area mapping table based on the verification value field includes: Perform CRC32 calculation on all fields in the failure area mapping table except for the check value field to obtain the current CRC32 check value; The current CRC32 check value is compared with the CRC32 check value stored in the failure area mapping table; If both conditions are met, the failure area mapping table is determined to have passed the data integrity check.

3. The memory failure region masking and reuse method according to claim 1, characterized in that, The preset LPDDR5 physical address mapping rules are used to determine at least the column address field, channel address field, memory bank group address field, memory bank address field, and row address field in the physical address; The address width parameter is determined based on the single-chip selected capacity, and the width of the row address field is determined based on the address width parameter. Based on the physical address mapping rules, the chip select identifier, the memory index, and the block index, the physical address belonging to the corresponding failure region is determined, instead of directly converting the block index into a single continuous address range.

4. A method for marking memory failure areas based on the unique identifier of an LPDDR5 chip, executed by a testing device, characterized in that, include: Obtain the single-chip select capacity of the LPDDR5 memory chip to be tested; The LPDDR5 memory chip is subjected to read / write verification tests at three levels: chip select, memory bank, and block, and the physical addresses corresponding to read / write verification failures are recorded. The address width parameter is determined based on the single chip select capacity, and the physical address is decoded according to the preset LPDDR5 physical address mapping rules to obtain the chip select identifier, channel address, memory bank group address, memory bank address, row address and column address corresponding to the physical address; The memory bank index is determined based on the memory bank group address and the memory bank address, and the block index is determined based on the preset high-order bits in the row address; The set of failed regions is determined based on the chip select identifier, storage bank index, and block index corresponding to each physical address that failed read / write verification. Read the unique chip identifier of the LPDDR5 memory chip; A failure region mapping table is generated based on the chip's unique identifier, the set of failure regions, and the block size determined by the single-chip selected capacity. The failure region mapping table includes at least a chip unique identifier field, a block size field, a failure region quantity field, failure region index information, and a check value field.

5. The memory failure region marking method according to claim 4, characterized in that, The steps of determining the address bit width parameter based on the single-chip select capacity and decoding the physical address include: The corresponding address width parameter is obtained by taking the logarithm to the base 2 of the single-chip select capacity and rounding it up. The chip select identifier is determined based on the offset of the physical address relative to the starting position of the LPDDR5 memory chip address space and the single chip select capacity; The offset is modulo the single chip select capacity to obtain the local address inside the chip select. Based on the address width parameter and the preset address field offsets, the channel address, memory group address, memory address, row address, and column address are parsed from the local address within the chip select.

6. The memory failure region marking method according to claim 4, characterized in that, When the single-chip select capacity is not an integer power of 2, the actual effective address range is determined based on the single-chip select capacity; Blocks that exceed the actual effective address range within the theoretical address range formed by the address bit width parameter obtained by rounding up are determined as invalid blocks; The invalid blocks are excluded when generating the set of failed regions.

7. A method for downloading and configuring a failure region mapping table based on the unique identifier of an LPDDR5 chip, executed by a processor and a download tool, characterized in that... include: After the processor completes the basic initialization to be able to read the mode register of the LPDDR5 memory chip, it reads the mode registers MR47 to MR54 of the LPDDR5 memory chip and obtains the chip's unique identifier based on the reading results. The processor sends the chip's unique identifier to the download tool via a communication interface; The download tool uses the chip's unique identifier as the search key to search for a failure area mapping table corresponding to the chip's unique identifier in a preset database. When the corresponding failure area mapping table is found, the found failure area mapping table is sent to the processor; The processor writes the received failure region mapping table into a non-volatile storage medium for subsequent system startup phase reading and failure region masking.

8. A memory failure area marking and masking reuse system based on the unique identifier of LPDDR5 chips, characterized in that, This includes LPDDR5 memory chips, testing equipment, download tools, non-volatile storage media, and processors. The testing equipment is used to perform read and write verification tests on the LPDDR5 memory chip according to the three-level granularity of chip select, memory bank and block. The physical address corresponding to the read and write verification failure is decoded. The failure area is determined according to the chip select identifier, memory bank index and block index obtained by decoding, and a failure area mapping table corresponding to the chip unique identifier of the LPDDR5 memory chip is generated. The failure area mapping table includes at least a chip unique identifier field, a block size field, a failure area quantity field, failure area index information, and a CRC32 check value field. The download tool is used to receive the chip's unique identifier read by the processor, use the chip's unique identifier as a search key to search for the corresponding failure area mapping table in a preset database, and send the matched failure area mapping table to the processor. The processor is used to write the failure region mapping table into the non-volatile storage medium, and in the subsequent system startup phase, read the chip unique identifier of the LPDDR5 memory chip and the failure region mapping table in the non-volatile storage medium, and perform CRC32 verification and chip unique identifier comparison on the failure region mapping table. The processor is also configured to, when the CRC32 check passes and the chip unique identifier matches, determine the corresponding set of physical addresses to be masked based on the failure area index information, block size and LPDDR5 physical address mapping rules, exclude the set of physical addresses to be masked during LPDDR5 memory initialization and available memory configuration, and report the remaining available address space to the operating system.

9. An electronic device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the memory failure region masking and reuse method as described in any one of claims 1 to 3.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the corresponding processor, it implements the memory failure region masking and reuse method according to any one of claims 1 to 3, or the memory failure region marking method according to any one of claims 4 to 6, or the failure region mapping table download and configuration method according to claim 7.