A memory test screening method and related device
By testing the storage capacity, write count, and data read status of the RPMB of the UFS storage device in the power-off state, obtaining reference results and screening and grading them, the problem of incomplete RPMB testing in the existing technology is solved, and flexible screening and stability improvement of the memory are achieved.
Patent Information
- Application Number
- CN202510781286.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-12
AI Technical Summary
In the prior art, the replay protection memory block (RPMB) test tool of the UFS storage device cannot perform comprehensive testing and cannot effectively screen the memory based on the test results.
A memory test screening method is provided, which obtains reference test results by performing functional tests on RPMB, including storage capacity configuration information, write instruction matching counting information, and data reading information in a power-off state. The memory is screened based on the test results to determine a target screening grade.
The comprehensiveness of RPMB testing and the flexibility of memory screening have been improved. By matching different target screening levels, the functional stability and deployment flexibility of memory in different scenarios have been improved.
Smart Images

Figure CN120299501B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a memory test screening method and related devices. Background Art
[0002] The Replay Protected Memory Block (RPMB) is a security feature within a UFS storage device. It stores critical information in a small, user-verifiable storage partition that is protected from replay attacks. Currently, mainstream UFS storage device testing tools, such as Androidbench for mobile phones and PCmark for Windows, can only partially meet UFS performance testing requirements in specific test scenarios and cannot filter specific storage devices based on test results.
[0003] In view of this, how to conduct a more comprehensive test on RPMB and screen the memory according to the test results has become an urgent problem to be solved. Summary of the Invention
[0004] The main technical problem solved by the present application is to provide a memory test screening method and related devices, which can improve the comprehensiveness of testing RPMB and flexibly screen the memory.
[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a memory test screening method, including: based on the functional information matching the replay protection storage block RPMB in the memory, performing at least one functional test on the RPMB, and obtaining a reference test result matching each of the functional tests; wherein, the functional information includes at least one of storage capacity configuration information, count information of write instruction matching and data reading information in a power-off state, and the count information includes count data in a count overflow state; based on the reference test result matching each of the functional tests, the memory is screened to determine the target screening level of the memory match.
[0006] To solve the above technical problems, another technical solution adopted in this application is: to provide an electronic device, comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the method mentioned in the above technical solution.
[0007] In order to solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium storing program instructions that can be executed by a processor, wherein the program instructions are used to implement the method mentioned in the above technical solution.
[0008] The beneficial effects of the present application are as follows: Different from the prior art, the memory test screening method proposed in the present application uses at least one of the storage capacity configuration information, the count information of the write instruction match, and the data extraction information in the power-off state to perform at least one functional test on the RPMB in the memory. According to the reference test results matched by each functional test, the memory is screened to determine the matching target screening level. There are differences in functional stability between memories matched with different target screening levels. By combining target screening levels, it helps to improve the flexibility of deploying different memories in different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:
[0010] Figure 1 This is a flow chart of an embodiment of the memory test screening method of the present application;
[0011] Figure 2 yes Figure 1 Step S101 corresponds to a flow chart of another embodiment;
[0012] Figure 3 yes Figure 2 Step S202 corresponds to a flow chart of another embodiment;
[0013] Figure 4 This is a schematic structural diagram of an embodiment of the electronic device of the present application;
[0014] Figure 5 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them, and different embodiments can be adaptively combined. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0016] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a memory test screening method of the present application, the method comprising:
[0017] S101: Based on the functional information matching the replay protection storage block RPMB in the memory, perform at least one functional test on the RPMB to obtain a reference test result matching each functional test; wherein the functional information includes at least one of storage capacity configuration information, count information matching the write instruction and data reading information in the power-off state, and the count information includes count data in the count overflow state.
[0018] In one embodiment, matching functional information is obtained for a Replay Protected Memory Block (RPMB) in a memory, at least one functional test is performed on the RPMB using the functional information, and a reference test result matching each functional test is obtained. The reference test result indicates whether the corresponding functional test meets the test pass criteria.
[0019] In one implementation scenario, the functional information includes at least one of storage capacity configuration information, write command matching count information, and data read information in a power-off state. The count information includes count data in a count overflow state, i.e., the number of writes corresponding to the next data write round after the maximum number of writes is reached.
[0020] S102: Screening the memory based on the reference test results matched by each functional test, and determining a target screening grade for the memory match.
[0021] In one embodiment, based on the reference test results matched by each functional test, the corresponding memory is screened to determine a target screening rating matched by the memory.
[0022] Specifically, when any functional test corresponding to the RPMB fails to meet the test pass condition, the target screening classification of the corresponding memory is determined to be the first classification. Alternatively, when all functional tests corresponding to the RPMB meet the test pass condition, the target screening classification of the corresponding memory is determined to be the second classification. Among them, the functional stability of the memory corresponding to the second classification is better than that of the memory corresponding to the first classification.
[0023] The memory test screening method proposed in this application uses at least one of the storage capacity configuration information, the count information of the write instruction match, and the data extraction information in the power-off state to perform at least one functional test on the RPMB in the memory. According to the reference test results matched by each functional test, the memory is screened to determine the matching target screening level. The memories matched with different target screening levels have differences in functional stability. By combining target screening levels, it helps to improve the flexibility of deploying different memories in different scenarios.
[0024] See also Figure 2, Figure 2 yes Figure 1 Step S101 corresponds to a flow chart of another embodiment. Specifically, the implementation process of step S101 includes:
[0025] S201: Based on the storage capacity configuration information, perform an abnormal storage capacity test on the RPMB to obtain a first reference test result.
[0026] In one embodiment, in response to the RPMB being pre-configured with multiple storage partitions, a test storage capacity is determined based on a storage capacity threshold matched by each storage partition; wherein the test storage capacity is greater than the storage capacity threshold.
[0027] Specifically, a storage capacity threshold value matching each storage partition pre-configured by the RPMB is obtained, where the storage capacity threshold value is used to characterize the maximum storage capacity of each storage partition. Based on the storage capacity threshold value, a test storage capacity is determined such that the test storage capacity is greater than the storage capacity threshold value.
[0028] Furthermore, based on the tested storage capacity, a capacity configuration instruction matching each storage partition is generated. Based on the capacity configuration instruction, a first reference test result is obtained.
[0029] Specifically, based on the test storage capacity, a capacity configuration instruction that matches each storage partition is generated, and the capacity configuration instruction is used to configure the storage capacity of the corresponding storage partition as the test storage capacity. Run the above capacity configuration instruction, and obtain the configuration feedback results of each storage partition. Based on the configuration feedback results, determine the first reference test result. For example, when the configuration feedback result of any storage partition indicates that the storage capacity is successfully configured as the test storage capacity, the first reference test result is that RPMB fails the abnormal storage capacity test; or, when the configuration feedback results of all storage partitions indicate that the storage capacity fails to be configured as the test storage capacity, the first reference test result is that RPMB passes the abnormal storage capacity test.
[0030] In a specific application scenario, each storage partition region in the RPMB, and according to relevant protocol regulations, the storage capacity of each storage partition region should not exceed the storage capacity threshold of 16M. In order to test the reliability of each storage partition region during capacity configuration, a test storage capacity of 20M is set, and a corresponding capacity configuration instruction is generated. For example, when the RPMB includes storage partition region0, storage partition region1, and storage partition region2, the storage capacity of storage partition region0 is configured to 20M using the capacity configuration instruction, and the configuration feedback result of storage partition region0 is obtained to determine whether the configuration is successful; similarly, for storage partition region1 and storage partition region2, the corresponding storage capacity is configured to 20M using the capacity configuration instruction, and the configuration feedback result is obtained. When the configuration feedback results of storage partition region0, storage partition region1, and storage partition region2 all indicate configuration failure, the first reference test result is that the RPMB passes the abnormal storage capacity test; otherwise, the first reference test result is that the RPMB fails the abnormal storage capacity test.
[0031] In another embodiment, the implementation process of step S201 may further include: in response to the RPMB matching the maximum capacity, determining the number of storage partitions pre-configured by the RPMB. Generating a capacity configuration instruction that matches each storage partition, and calculating the sum of the capacities of the configured storage partitions. In response to the above-mentioned sum of capacities being greater than the maximum capacity matched by the RPMB, obtaining a corresponding feedback result. Based on the feedback result, obtaining a first reference test result.
[0032] In a specific application scenario, when the maximum capacity matched by the RPMB is 16M and the RPMB includes storage partition region0, storage partition region1, and storage partition region2, the storage capacity of storage partition region0 is configured to 8M using a capacity configuration instruction, and the configuration feedback result of storage partition region0 is obtained to determine whether the configuration is successful; further, for storage partition region1, the storage capacity of storage partition region1 is configured to 8M using a capacity configuration instruction, and the configuration feedback result of storage partition region1 is obtained to determine whether the configuration is successful; further, for storage partition region2, the storage capacity of storage partition region2 is configured to 8M using a capacity configuration instruction, and the configuration feedback result of storage partition region2 is obtained to determine whether the configuration is successful. If the configuration feedback results of storage partition region0 and storage partition region1 are successful, and the configuration feedback result of storage partition region2 is failed, a first reference test result is obtained to indicate that the RPMB has passed the abnormal storage capacity test; otherwise, a first reference test result is obtained to indicate that the RPMB has failed the abnormal storage capacity test.
[0033] In another embodiment, the implementation process of the above step S201 further includes: when the RPMB passes the two tests in the above corresponding embodiment, it is determined that the RPMB passes the abnormal storage capacity test.
[0034] S202: Based on the counting information matched by the write instruction, perform a counting test on the RPMB to obtain a second reference test result.
[0035] In one embodiment, data is written to the RPMB, and the corresponding current write count is obtained after the data is written. Repeat the above steps of writing data to the RPMB until the current write count reaches the maximum write count matched by the RPMB, and determine whether the current write count after each data write meets the test pass condition, thereby obtaining a second reference test result.
[0036] S203: Based on the data reading information in the power-off state, perform a power-off test on the RPMB to obtain a third reference test result.
[0037] In one embodiment, a data write instruction for writing target data into the RPMB is obtained, wherein the data write instruction includes a plurality of process sub-commands.
[0038] Specifically, the RPMB is functionally initialized. For the RPMB after functional initialization, a data write instruction is obtained, the data write instruction including a plurality of process sub-commands, and the plurality of process sub-commands are executed in sequence according to a target order to write the target data into the RPMB.
[0039] In one implementation scenario, the above process of initializing the RPMB function includes: configuring corresponding fields so that the RPMB supports data writing.
[0040] Furthermore, while some of the process sub-commands are not executed, power-off and power-on operations are sequentially performed. A data read instruction matching the data write instruction is generated, and actual read data is obtained using the data read instruction. Based on the actual read data, a third reference test result is obtained.
[0041] Specifically, after performing power-off and power-on operations, a corresponding data read instruction is generated, and the data read instruction is used to read the actual read data from the RPMB. It is determined whether the actual read data is consistent with the target data. If not, the corresponding third reference test result is obtained to indicate that the RPMB has passed the power-off test; otherwise, the corresponding third reference test result is obtained to indicate that the RPMB has failed the power-off test.
[0042] In a specific application scenario, multiple process sub-commands include two SP Outs (Security Protocol Out) and one SP In (Security Protocol In) in sequence. A data write instruction is executed, and when the second SP Out sub-command is issued and the SP In sub-command has not yet been issued, the memory is powered off first. After a preset time, the memory is powered back on and a data read instruction is generated. The data read instruction is used to obtain the actual read data. Because some process sub-commands in the above data write instruction were not executed, the target data was not fully written. The reliability of the RPMB in the power-off condition is tested by comparing the actual read data with the target data.
[0043] See also Figure 3 , Figure 3 yes Figure 2 Step S202 corresponds to a flow chart of another embodiment. Specifically, the implementation process of step S202 includes:
[0044] S301: Call the parameter modification component to use the target value as the current write count matched by RPMB, and write data based on the target value.
[0045] In one embodiment, the RPMB is functionally initialized. At the protocol layer, a parameter modification component is called to modify the target value to the current number of writes matched by the RPMB. The process of functionally initializing the RPMB can refer to the corresponding embodiment described above.
[0046] Furthermore, a data write instruction is generated, and the corresponding data is written into the RPMB based on the current number of writes being the target value.
[0047] S302: Generate a read instruction, and use the read instruction to re-acquire the current number of write times.
[0048] In one embodiment, a read instruction for reading the current number of write times is generated. The current number of write times is re-read by the read instruction.
[0049] S303: Obtain a comparison result between the current number of write times and the target value, and obtain a current reference test sub-result based on the comparison result.
[0050] In one embodiment, the latest acquired current write count is compared with the target value to obtain a corresponding comparison result, and the current reference test sub-result of the current test round is obtained based on the comparison result.
[0051] In one implementation scenario, in response to the target value being less than the maximum number of writes and the current number of writes being the target value plus one, the current test round is determined to satisfy the corresponding test pass condition, and a corresponding current reference test sub-result is generated. Alternatively, in response to the target value being less than the maximum number of writes and the current number of writes not being the target value plus one, the number of writes fails to increment according to a preset specification during continuous data writing, the current test round is determined to fail to satisfy the corresponding test pass condition, and a corresponding current reference test sub-result is generated.
[0052] It should be noted that when the current reference test sub-result indicates that the current test round does not meet the corresponding test pass condition, the counting test on the RPMB is completed.
[0053] In another implementation scenario, in response to the target value being equal to the maximum number of writes and the current number of writes being the initial number of writes matched by the RPMB, it is determined that the current test round meets the corresponding test pass condition, and a corresponding current reference test sub-result is generated. Alternatively, in response to the target value being equal to the maximum number of writes and the current number of writes being inconsistent with the initial number of writes matched by the RPMB, it indicates that the RPMB has failed to reset the write count in the count overflow state, and it is determined that the current test round does not meet the corresponding test pass condition, and a corresponding current reference test sub-result is generated.
[0054] Specifically, when the target value reaches the maximum number of writes matched by the RPMB, in order to avoid the number of writes exceeding the maximum number of writes, when the next round of data writing is performed, the current number of writes obtained is updated to the initial number of writes, and the number of writes is increased in sequence in subsequent rounds of data writing until the maximum number of writes is reached. Therefore, when the target value is equal to the maximum number of writes, after a new round of data writing is performed, if the current number of writes obtained is inconsistent with the initial number of writes, the corresponding current reference test sub-result is generated to indicate that the test fails. Among them, the above-mentioned initial number of writes is zero.
[0055] S304: Write data based on the current number of writes, use the current number of writes to update the target value, return to the step of generating a read instruction, and use the read instruction to re-obtain the current number of writes until the target value reaches the maximum number of writes matched by RPMB.
[0056] In one embodiment, a new round of data writing is performed according to the current writing times, and the target value is updated using the current writing times, that is, the latest current writing times are used as the target value.
[0057] Further, return to the above step S302 and execute subsequent steps in sequence until the target value reaches the maximum number of writes matched by RPMB.
[0058] S305: Obtain a second reference test result based on the current reference test sub-result.
[0059] In one embodiment, a second reference test result corresponding to the counting test is obtained based on all obtained current reference test sub-results.
[0060] Specifically, when all current reference test sub-results indicate that the corresponding test round meets the corresponding test pass condition, a second reference test result is generated to indicate that the RPMB has passed the counting test. Alternatively, when any current reference test sub-result indicates that the corresponding test round does not meet the corresponding test pass condition, a second reference test result is generated to indicate that the RPMB has failed the counting test.
[0061] In another embodiment, the function information further includes at least one of key content, read / write instruction information, and parameter information matching the read / write instruction. When the function information is key information, read / write instruction information, or the aforementioned parameter information, the implementation process of step S101 includes: obtaining interference information corresponding to the function information and not supported by the RPMB, triggering the corresponding function of the RPMB using the interference information, obtaining a feedback result from the RPMB, and obtaining a reference test result based on the feedback result.
[0062] Specifically, to test the functional reliability of the RPMB, interference information is generated and corresponding feedback results are obtained using the interference information. Based on the obtained feedback results, reference test results are obtained to determine whether the RPMB passes the corresponding test.
[0063] In one implementation scenario, when the functional information is the key content, after the RPMB is functionally initialized, the key content that matches the RPMB in the first test round is obtained, the data of the current round is written based on the above key content, and the first feedback sub-result corresponding to the current round is obtained. Furthermore, a first interference content that matches the next round is generated, and the first interference content is different from the key content that matches the RPMB in the next round. The data of the next round is written based on the above first interference content, and the second feedback sub-result corresponding to the next round is obtained. Return to the step of generating the interference content that matches the next round, and execute the subsequent processes in sequence until the number of executions meets the preset number threshold, and obtain the feedback sub-result corresponding to each round. Optionally, since the key content is different in different data writing rounds, in order to improve the test efficiency, the key content in the first test round is used as the first interference content matched in each subsequent round.
[0064] Furthermore, based on the first feedback sub-result and all second feedback sub-results, a determination is made as to whether the RPMB has passed the test. Specifically, if the first feedback sub-result indicates that data writing is successful, and each second feedback sub-result indicates that data writing fails, the corresponding reference test result is obtained to indicate that the corresponding test item has passed; otherwise, the corresponding reference test result is obtained to indicate that the corresponding test item has failed.
[0065] In another implementation scenario, when the functional information is read or write instruction information, due to the encryption characteristics of the RPMB, it only supports specific types of read or write instruction information. For example, the RPMB's write instruction consists of two SP Outs (Security Protocol Out) and one SP In (Security Protocol In), and the RPMB's read instruction consists of one SP Out (Security Protocol Out) and one SP In (Security Protocol In). To prevent other types of abnormal instructions from writing or reading data from the RPMB, a reliability test is performed on it using instructions that the RPMB does not support. Specifically, after the RPMB is functionally initialized, second interference information is generated, which includes multiple interference instructions that the RPMB does not support. Each interference instruction in the second interference information is used to write or read data from the RPMB, and feedback results matching each interference instruction are obtained. If each feedback result indicates a processing failure, the corresponding reference test result is obtained to indicate that the corresponding test item has passed; otherwise, the corresponding reference test result is obtained to indicate that the corresponding test item has failed.
[0066] In a specific application scenario, the second interference information may be a UFS protocol command not supported by RPMB, etc.
[0067] In another implementation scenario, since the read instructions and write instructions matched by RPMB are composed of multiple process sub-commands in a prescribed order, in order to avoid the situation in which, during the actual processing process, multiple process sub-commands are waiting in a queue or multiple process sub-commands are processed concurrently, the process sub-commands corresponding to the read instruction or write instruction fail to be issued in the prescribed order, thereby affecting the reading or writing of data, when the functional information is read-write instruction information, the RPMB is reliability tested based on the order of the process sub-commands in the read instruction and the write instruction. Specifically, after the RPMB is functionally initialized, a third interference information is generated, which includes at least one interference read instruction and at least one interference write instruction. The above-mentioned interference read instruction is used to read data from the RPMB to obtain a corresponding feedback result; and the above-mentioned interference write instruction is used to write data to the RPMB to obtain a corresponding feedback result.
[0068] Furthermore, when the feedback result corresponding to the interference read instruction in the third interference information indicates that the data read fails, and the feedback result corresponding to the interference write instruction in the third interference information indicates that the data write fails, the corresponding reference test result is obtained to indicate that the corresponding test item has passed; otherwise, the corresponding reference test result is obtained to indicate that the corresponding test item has not passed.
[0069] In a specific application scenario, in response to an RPMB write instruction consisting of two SP Outs (Security Protocol Out) and one SP In (Security Protocol In), and an RPMB read instruction consisting of one SP Out (Security Protocol Out) and one SP In (Security Protocol In), a generated interference write instruction consists of one SP Out, one SP In, and one SP Out, and a generated interference read instruction consists of one SP In and one SP Out. The above interference write and interference read instructions are used to write and read data from the RPMB, respectively, and the corresponding feedback results are obtained.
[0070] In another implementation scenario, the read instructions and write instructions corresponding to RPMB are respectively composed of multiple process sub-commands, and each process sub-command is matched with corresponding parameter information, which is used to characterize the command specification value of the corresponding process sub-command. When the functional information is the parameter information matched by the read and write instructions, in order to test the reliability of RPMB when writing or reading data, after the RPMB is functionally initialized, the fourth interference information is generated, and the fourth interference information includes an interference write instruction and an interference read instruction, wherein the parameter information of each process sub-command in the above-mentioned interference write instruction is different from the corresponding command specification value, and the parameter information of at least one process sub-command in the above-mentioned interference write instruction is different from the corresponding command specification value. The above-mentioned interference write instruction and interference read instruction are used to write and read data to and from RPMB respectively, and obtain corresponding feedback results.
[0071] Further, when the feedback result corresponding to the interference read instruction in the fourth interference information indicates that the data read fails, and the feedback result corresponding to the interference write instruction in the fourth interference information indicates that the data write fails, the corresponding reference test result is obtained to indicate that the corresponding test item has passed; otherwise, the corresponding reference test result is obtained to indicate that the corresponding test item has not passed.
[0072] In a specific application scenario, an RPMB write instruction consists of two Security Protocol Outs (SP Outs) and one Security Protocol In, with the command specification values of these sub-commands being 0003h, 0005h, and 0300h, respectively. An RPMB read instruction consists of one Security Protocol Out (SP Out) and one Security Protocol In, with the command specification value of the SP Out sub-command being 0004h. To test the reliability of the RPMB under different parameter information, a disturbing write instruction consisting of two SP Outs and one SP In was generated, with the parameter information of the first SP Out not equal to any value within 0003h, the parameter information of the second SP Out not equal to any value within 0005h, and the parameter information of the SP In not equal to any value within 0300h. Furthermore, a disturbing read instruction consisting of one SP Out and one SP In was generated, with the parameter information of the SP Out not equal to any value within 0004h.
[0073] In yet another embodiment, Figure 1 The specific implementation process of step S101 may further include: constructing a target sequence including at least one test item based on the functional information, testing the test items in the target sequence in sequence, and obtaining a reference test result matching the test items.
[0074] In one implementation scenario, when the functional information includes storage capacity configuration information, write command matching count information, and data read information in a power-off state, a target sequence is constructed based on the functional information. The target sequence sequentially includes abnormal storage capacity test items, count test items, and power-off test items. The test items in the target sequence are tested sequentially to obtain corresponding reference test results.
[0075] Furthermore, on this basis, Figure 1 The specific implementation process of step S102 includes: in response to the reference test result of the current test item matching not meeting the test pass condition, stopping the test and using the first level as the target screening level for memory matching. Alternatively, in response to the reference test results of all test items matching meeting the test pass condition, using the second level as the target screening level for memory matching.
[0076] Specifically, if the reference test result matched by the current test item does not meet the test pass condition, the test of the subsequent test item will no longer be continued, and the corresponding memory will be deemed to not meet the test pass condition, and the first level will be used as the target screening level for matching. Alternatively, if all test items are completed and the reference test results matched by all test items meet the corresponding test pass conditions, the second level will be used as the target screening level for memory matching. Among them, the stability and reliability of the memory with the target screening level of the second level are better than the memory with the target screening level of the first level. By determining the target screening level corresponding to the memory, the memory can be flexibly deployed in actual applications in combination with the target screening level and scenario requirements. For example, for scenarios with higher reliability requirements, a memory with the target screening level of the second level is deployed.
[0077] In yet another embodiment, Figure 1 The specific implementation process of step S101 may further include: constructing a target sequence including at least one test item based on the function information, testing each test item in the target sequence, and obtaining a reference test result matching the test item.
[0078] Furthermore, the implementation process of step S102 includes: obtaining a first number of reference test results that meet the corresponding test pass condition. Based on the first number, determining a target screening level for memory matching. The greater the first number, the higher the target screening level.
[0079] Specifically, by obtaining a first number of reference test results that meet the corresponding test pass conditions, the number of test items passed by the memory is determined. The more test items passed, the higher the reliability and stability of the memory, and the higher the target screening grade is given.
[0080] See also Figure 4 , Figure 41 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device includes: a memory 10 and a processor 20, which are coupled to each other. The memory 10 stores program instructions, and the processor 20 is used to execute the program instructions to implement the method described in any of the above embodiments. Specifically, the electronic device includes, but is not limited to, desktop computers, laptop computers, tablet computers, servers, etc., which are not limited here. In addition, the processor 20 may also be referred to as a CPU (Center Processing Unit). The processor 20 may be an integrated circuit chip with signal processing capabilities. The processor 20 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor. In addition, the processor 20 may be implemented by an integrated circuit chip.
[0081] See also Figure 5 , Figure 5 This is a structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 30 stores program instructions 40 that can be run by a processor. When the program instructions 40 are executed by the processor, the method mentioned in any of the above embodiments is implemented.
[0082] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0083] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0084] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the various implementation methods of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0086] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A memory test screening method, characterized in that: include: Based on functional information matching a replay protection storage block RPMB in a memory, performing at least one functional test on the RPMB, and obtaining a reference test result matching each functional test; wherein the functional information includes at least one of storage capacity configuration information, count information of write instruction matches, and data read information in a power-off state, the count information includes count data in a count overflow state, and the count data is the number of writes corresponding to the next data write round after the current number of writes reaches the maximum number of writes; screening the memory based on a reference test result matched by each functional test, and determining a target screening grade matched by the memory; In which, the functional information also includes at least one of key content, read-write instruction information and parameter information matching read-write instructions. When the functional information is key content, the read-write instruction information or the parameter information, the functional information is based on the functional information matching the RPMB in the memory, and at least one functional test is performed on the RPMB to obtain a reference test result matching each of the functional tests, including: obtaining interference information corresponding to the functional information and not supported by the RPMB, using the interference information to trigger the function corresponding to the RPMB, and obtaining the feedback result of the RPMB; based on the feedback result, obtaining the reference test result.
2. The method according to claim 1, characterized in that The performing at least one functional test on the RPMB based on the functional information matching the RPMB in the memory and obtaining a reference test result matching each functional test includes: Based on the storage capacity configuration information, performing an abnormal storage capacity test on the RPMB to obtain a first reference test result; and Based on the count information matched by the write instruction, a count test is performed on the RPMB to obtain a second reference test result; and Based on the data reading information in the power-off state, a power-off test is performed on the RPMB to obtain a third reference test result.
3. The method according to claim 2, characterized in that The performing an abnormal storage capacity test on the RPMB based on the storage capacity configuration information to obtain a first reference test result includes: In response to the RPMB being pre-configured with a plurality of storage partitions, determining a test storage capacity based on a storage capacity threshold matched by each of the storage partitions; wherein the test storage capacity is greater than the storage capacity threshold; Based on the test storage capacity, generating a capacity configuration instruction matching each of the storage partitions; Based on the capacity configuration instruction, the first reference test result is obtained.
4. The method according to claim 2, characterized in that The performing a counting test on the RPMB based on the counting information matched by the write instruction to obtain a second reference test result includes: Call the parameter modification component to use the target value as the current write count matched by the RPMB, and write data based on the target value; Generate a read instruction, and use the read instruction to re-acquire the current number of write times; Obtaining a comparison result between the current number of write times and the target value, and obtaining a current reference test sub-result based on the comparison result; Writing data based on the current number of writes, updating the target value using the current number of writes, returning to the step of generating a read instruction, and re-obtaining the current number of writes using the read instruction, until the target value reaches the maximum number of writes matched by the RPMB; Based on the current reference test sub-result, the second reference test result is obtained.
5. The method according to claim 4, characterized in that The obtaining of a comparison result between the current number of write times and the target value, and obtaining a current reference test sub-result based on the comparison result, includes: In response to the target value being less than the maximum number of write times and the current number of write times being the target value plus one, determining that the current test round satisfies a test pass condition, and generating the corresponding current reference test sub-result; In response to the target value being equal to the maximum number of writes and the current number of writes being the initial number of writes matched by the RPMB, it is determined that the current test round meets the test pass condition, and the corresponding current reference test sub-result is generated.
6. The method according to claim 2, characterized in that The performing a power-off test on the RPMB based on the data reading information in the power-off state to obtain a third reference test result includes: Obtaining a data write instruction for writing target data into the RPMB; wherein the data write instruction includes a plurality of process sub-commands; When some of the sub-commands of the process are not executed, power-off and power-on operations are executed in sequence; Generate a data read instruction that matches the data write instruction, and use the data read instruction to obtain actual read data; Based on the actual read data, the third reference test result is obtained.
7. The method according to claim 1, characterized in that The performing at least one functional test on the RPMB based on the functional information matching the RPMB in the memory and obtaining a reference test result matching each functional test includes: Based on the functional information, construct a target sequence including at least one test item, test the test items in the target sequence in sequence, and obtain a reference test result matching the test item; The step of screening the memory based on the reference test result matched by each functional test to determine a target screening grade for the memory match includes: In response to a reference test result matched by the current test item not satisfying a test pass condition, stopping the test and using the first level as the target screening level for the memory match; In response to all the reference test results of the test item matches satisfying a test pass condition, the second level is used as the target screening level for the memory match.
8. An electronic device, characterized in that: The method comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is configured to execute the program instructions to implement the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
RPMB function test method and device, computer equipment and storage medium
CN116052755A
RPMB regional performance test method and device based on UFS storage device
CN118471317A