Memory test screening method and related device
By performing functional tests on the replay protection memory block RPMB of UFS storage device, the problem of incomplete RPMB testing in the prior art is solved, and flexible memory screening and stability evaluation are realized.
Patent Information
- Application Number
- CN202510781286.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-06-12
AI Technical Summary
The prior art cannot conduct comprehensive testing and effective screening of playback protection memory block RPMB in UFS storage devices, resulting in inflexible memory deployment.
A memory test filtering method is provided, and the RPMB is functionally tested for storage capacity configuration information, count information for write instruction matching and data reading information in power-down state, and reference test results are obtained, and filtered based on the test results to determine the target filtering rating.
It improves the comprehensiveness of RPMB testing and the accuracy of memory screening, and enhances the deployment flexibility of memory in different scenarios.
Smart Images

Figure CN120299501A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a method for testing and screening memories and related devices. Background Art
[0002] A Replay Protected Memory Block (RPMB) is a partition in a Universal Flash Storage (UFS) device that provides security protection features. This partition is mainly used to store important information in a small storage partition that prevents replay attacks and passes user verification. Currently, in the mainstream UFS device testing tools in the prior art, such as the Androidbench tool in a mobile phone environment and Pcmark in a Windows environment, etc., can only meet some requirements of UFS performance testing in specific test scenarios, and cannot screen the corresponding memories according to the test results.
[0003] In view of this, how to test the RPMB more comprehensively and screen the memories according to the test results has become an urgent problem to be solved. Summary of the Invention
[0004] The main technical problem to be solved by this application is to provide a method for testing and screening memories and related devices, which can improve the comprehensiveness of testing the RPMB and flexibly screen the memories.
[0005] To solve the above technical problem, a technical solution adopted by this application is: to provide a method for testing and screening memories, including: performing at least one function test on the RPMB based on function information matching the Replay Protected Memory Block (RPMB) in the memory, and obtaining reference test results matching each function test; wherein, the function information includes at least one of storage capacity configuration information, count information matching a write instruction, and data reading information in a power-off state, and the count information includes count data in a count overflow state; screening the memory based on the reference test results matching each function test, and determining the target screening level matched by the memory.
[0006] To solve the above technical problem, another technical solution adopted by this application is: to provide an electronic device, including a memory and a processor coupled to each other, wherein program instructions are stored in the memory, and the processor is configured to execute the program instructions to implement the method mentioned in the above technical solution.
[0007] To solve the above technical problem, another technical solution adopted by this application is: to provide a computer-readable storage medium, storing program instructions that can be run by a processor, and the program instructions are used to implement the method mentioned in the above technical solution.
[0008] The beneficial effects of this application are as follows: Different from the prior art, the memory test and screening method proposed in this application performs at least one functional test on the RPMB in the memory by using at least one of the storage capacity configuration information, the count information matching the write instruction, and the data extraction information in the power-off state. According to the reference test results matching each functional test, the memory is screened to determine the matching target screening level, and there are differences in functional stability among the memories matching different target screening levels. By combining the target screening levels, it helps to improve the flexibility of different memories deployed in different scenarios. Description of the Drawings
[0009] In order to more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them: Figure 1 is a schematic flowchart of an implementation manner of the memory test and screening method of this application; Figure 2 is Figure 1 a schematic flowchart of another implementation manner corresponding to step S101 in Figure 3 is Figure 2 a schematic flowchart of another implementation manner corresponding to step S202 in Figure 4 is a schematic structural diagram of an implementation manner of the electronic device of this application; Figure 5 is a schematic structural diagram of an implementation manner of the computer-readable storage medium of this application. Detailed Embodiments
[0010] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, not all embodiments, and different embodiments can be adaptively combined. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this application.
[0011] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an implementation manner of the memory test and screening method of this application. The method includes: S101: Based on the function information that matches the Replay Protected Memory Block (RPMB) in the memory, perform at least one function test on the RPMB to obtain the reference test results that match each function test; wherein, the function 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 the count data in the count overflow state.
[0012] In one embodiment, for the RPMB (Replay Protected Memory Block) in the memory, obtain the matching function information, use the function information to perform at least one function test on the RPMB, and obtain the reference test results that match each function test. Among them, the reference test results are used to characterize whether the corresponding function test meets the test pass condition.
[0013] In one implementation scenario, the above function 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. Among them, the count information includes the count data in the count overflow state, that is, when the write count reaches the maximum write count, the write count corresponding to the next data write round.
[0014] S102: Based on the reference test results that match each function test, screen the memory to determine the target screening level that the memory matches.
[0015] In one embodiment, screen the corresponding memory according to the reference test results that match each function test to determine the target screening level that the memory matches.
[0016] Specifically, when any function test corresponding to the RPMB does not meet the test pass condition, it is determined that the target screening level of the corresponding memory is the first level. Or, when all function tests corresponding to the RPMB meet the test pass condition, it is determined that the target screening level of the corresponding memory is the second level. Among them, the function stability of the memory corresponding to the second level is better than that of the memory corresponding to the first level.
[0017] The memory test and screening method proposed in this application uses at least one of storage capacity configuration information, count information matching the write instruction, and data extraction information in the power-off state to perform at least one function test on the RPMB in the memory. According to the reference test results that match each function test, screen the memory to determine the target screening level that matches. There are differences in the function stability of the memories that match different target screening levels. By combining the target screening levels, it helps to improve the flexibility of different memories deployed in different scenarios.
[0018] Please refer to Figure 2 ,Figure 2 Yes Figure 1 It is a schematic flowchart of step S101 corresponding to another embodiment. Specifically, the implementation process of step S101 includes: S201: Based on the storage capacity configuration information, perform an abnormal storage capacity test on the RPMB to obtain a first reference test result.
[0019] In one embodiment, in response to the RPMB being pre-configured with multiple storage partitions, based on the storage capacity threshold matched for each storage partition, determine the test storage capacity; wherein, the test storage capacity is greater than the storage capacity threshold.
[0020] Specifically, obtain the storage capacity thresholds matched for each storage partition pre-configured in the RPMB, and the storage capacity threshold is used to represent the maximum storage capacity of each storage partition. According to the above storage capacity threshold, determine the test storage capacity such that the test storage capacity is greater than the storage capacity threshold.
[0021] Furthermore, based on the test storage capacity, generate a capacity configuration instruction matched for each storage partition. Based on the capacity configuration instruction, obtain the first reference test result.
[0022] Specifically, according to the test storage capacity, generate a capacity configuration instruction matched for each storage partition, and the capacity configuration instruction is used to configure the storage capacity of the corresponding storage partition to the test storage capacity. Run the above capacity configuration instruction and obtain the configuration feedback result of each storage partition. According to the configuration feedback result, 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 to the test storage capacity, then the first reference test result is that the RPMB fails the abnormal storage capacity test; or, when the configuration feedback results of all storage partitions indicate that the configuration of the storage capacity to the test storage capacity fails, then the first reference test result is that the RPMB passes the abnormal storage capacity test.
[0023] In a specific application scenario, each storage partition region in the RPMB, and according to the relevant protocol regulations, the storage capacity of each storage partition region should not exceed the storage capacity threshold of 16M. To test the reliability of each storage partition region during capacity configuration, a test storage capacity of 20M is set, and corresponding capacity configuration instructions are 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 instructions, 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 capacities are configured to 20M using the capacity configuration instructions, and the configuration feedback results are 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.
[0024] In another implementation, the implementation process of step S201 may further include: in response to the RPMB matching the maximum capacity, determining the number of pre-configured storage partitions in the RPMB. Generating capacity configuration instructions matching each storage partition, and calculating the total capacity of the configured storage partitions. In response to the above total capacity being greater than the maximum capacity matched by the RPMB, obtaining the corresponding feedback result. According to the feedback result, obtaining the first reference test result.
[0025] 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 a 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 a 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 a 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 passes the abnormal storage capacity test; otherwise, a first reference test result is obtained to indicate that the RPMB fails the abnormal storage capacity test.
[0026] In another embodiment, the implementation process of step S201 further includes: when the RPMB passes the two tests in the corresponding embodiments above, it is determined that the RPMB passes the abnormal storage capacity test.
[0027] 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.
[0028] 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, so as to obtain a second reference test result.
[0029] 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.
[0030] In one embodiment, a data write instruction for writing target data to the RPMB is obtained. The data write instruction includes multiple process sub-commands.
[0031] Specifically, perform functional initialization on the RPMB. For the RPMB after functional initialization, obtain a data write instruction, which includes multiple process sub-commands, and the multiple process sub-commands are executed in sequence according to the target order to implement writing the target data into the RPMB.
[0032] In an implementation scenario, the process of functionally initializing the RPMB includes: configuring corresponding fields to enable the RPMB to support data writing.
[0033] Further, in a state where some process sub-commands are not executed, power-off and power-on operations are sequentially performed. A data reading instruction matching the data writing instruction is generated, and the actual read data is obtained using the data reading instruction. Based on the actual read data, a third reference test result is obtained.
[0034] Specifically, after performing the power-off and power-on operations, a corresponding data reading instruction is generated, and the actual read data is read from the RPMB using the data reading instruction. It is determined whether the actual read data is consistent with the target data. If not, a corresponding third reference test result is obtained to indicate that the RPMB passes the power-off test; otherwise, a corresponding third reference test result is obtained to indicate that the RPMB fails the power-off test.
[0035] In a specific application scenario, multiple process sub-commands sequentially include two SP Out (Security ProtocolOut) and one SP In (Security Protocol In). The data writing instruction is executed, and when the second SP Out sub-command is completed and the SP In sub-command has not been issued yet, the power-off operation is preferentially performed on the memory. After a preset time period, the power-on operation is performed on the memory, and a data reading instruction is generated, and the actual read data is obtained using the data reading instruction. Since some process sub-commands in the above data writing instruction are not executed, the target data cannot be completely written. By comparing the actual read data with the target data, the reliability of the RPMB under power-off conditions is tested.
[0036] Please refer to Figure 3 , Figure 3 is Figure 2 a schematic flowchart of another implementation manner corresponding to step S202 in S301: Call the parameter modification component to use the target value as the current write count matched by the RPMB, and perform data writing based on the target value.
[0037] In an implementation manner, the RPMB is functionally initialized. At the protocol layer, the parameter modification component is called to modify the target value to the current write count matched by the RPMB. Among them, the process of functionally initializing the RPMB can refer to the corresponding implementation manner above.
[0038] Further, a data writing instruction is generated, and on the basis that the current write count is the target value, the corresponding data is written into the RPMB.
[0039] S302: Generate a read instruction and use the read instruction to re-obtain the current write count.
[0040] In one embodiment, a read instruction for reading the current write count is generated. Through the above read instruction, the current write count is re-read.
[0041] S303: Obtain the comparison result between the current write count and the target value, and based on the comparison result, obtain the current reference test sub-result.
[0042] In one embodiment, the latest obtained current write count and the target value are compared to obtain the corresponding comparison result. According to the comparison result, the current reference test sub-result in the current test round is obtained.
[0043] In one implementation scenario, in response to the target value being less than the maximum write count and the current write count being one more than the target value, it is determined that the current test round meets the corresponding test pass condition, and the corresponding current reference test sub-result is generated. Or, in response to the target value being less than the maximum write count and the current write count not being one more than the target value, during continuous data writing, if the write count fails to increase incrementally according to the preset rule, it is determined that the current test round does not meet the corresponding test pass condition, and the corresponding current reference test sub-result is generated.
[0044] 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 of the RPMB is completed.
[0045] In another implementation scenario, in response to the target value being equal to the maximum write count and the current write count being the initial write count matched by the RPMB, it is determined that the current test round meets the corresponding test pass condition, and the corresponding current reference test sub-result is generated. Or, in response to the target value being equal to the maximum write count and the current write count being inconsistent with the initial write count matched by the RPMB, it indicates that in the counting overflow state, the RPMB fails to clear the write count, and it is determined that the current test round does not meet the corresponding test pass condition, and the corresponding current reference test sub-result is generated.
[0046] Specifically, when the target value reaches the maximum write count matched by the RPMB, to avoid the write count exceeding the maximum write count, when performing the next round of data writing, the obtained current write count is updated to the initial write count, and the write count is incremented sequentially in subsequent rounds of data writing until the maximum write count is reached. Therefore, when the target value is equal to the maximum write count, after a new round of data writing, if the obtained current write count is inconsistent with the initial write count, the corresponding current reference test sub-result is generated to indicate that the test fails. Among them, the above initial write count is zero.
[0047] S304: Perform data writing based on the current write count, update the target value using the current write count, return to generating a read instruction, and use the read instruction to re-obtain the current write count until the target value reaches the maximum write count matching the RPMB.
[0048] In one embodiment, perform a new round of data writing according to the current write count, and update the target value using the current write count, that is, use the newly obtained current write count as the target value.
[0049] Further, return to the above step S302 and sequentially execute the subsequent steps until the target value reaches the maximum write count matching the RPMB.
[0050] S305: Obtain a second reference test result based on the current reference test sub-results.
[0051] In one embodiment, obtain the second reference test result corresponding to the counting test according to all the obtained current reference test sub-results.
[0052] Specifically, when all the current reference test sub-results indicate that the corresponding test rounds meet the corresponding test pass conditions, generate a second reference test result indicating that the RPMB passes the counting test. Or, when any one of the current reference test sub-results indicates that the corresponding test round does not meet the corresponding test pass conditions, generate a second reference test result indicating that the RPMB fails the counting test.
[0053] In yet 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 above 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 function corresponding to the RPMB using the interference information, and obtaining the feedback result of the RPMB. Based on the feedback result, obtain the reference test result.
[0054] Specifically, to test the functional reliability of the RPMB, generate interference information and obtain the corresponding feedback result using the interference information. According to the obtained feedback result, obtain the reference test result to determine whether the RPMB passes the corresponding test.
[0055] In an implementation scenario, when the function information is the key content, after initializing the function of the RPMB, obtain the key content matching the RPMB in the first test round, write data in the current round based on the above key content, and obtain the first feedback sub-result corresponding to the current round. Further, generate the first interference content matching the next round, where the first interference content is different from the key content matching the RPMB in the next round, write data in the next round based on the above first interference content, and obtain the second feedback sub-result corresponding to the next round. Return to the step of generating the interference content matching the next round, and sequentially execute the subsequent processes until the number of executions meets the preset number threshold, and obtain the feedback sub-results corresponding to each round. Optionally, since the key content is different in different data write rounds, to improve the test efficiency, use the key content in the first test round as the first interference content matching each subsequent round.
[0056] Further, based on the first feedback sub-result and all the second feedback sub-results, determine whether the RPMB passes the test. Specifically, when the first feedback sub-result indicates that the data write is successful, and each second feedback sub-result indicates that the data write fails, obtain the corresponding reference test result to indicate passing the corresponding test item; otherwise, obtain the corresponding reference test result to indicate failing the corresponding test item.
[0057] In another implementation scenario, when the function information is read / write instruction information, due to the encryption characteristics of the RPMB, it only supports specified types of read / write instruction information. For example, the write instruction of the RPMB consists of two SP Out (Security ProtocolOut) and one SP In (Security Protocol In), and the read instruction of the RPMB consists of one SP Out (Security Protocol Out) and one SP In (Security Protocol In). To avoid other types of abnormal instructions from writing or reading data to / from the RPMB, use the instructions not supported by the RPMB to perform a reliability test on it. Specifically, after initializing the function of the RPMB, generate the second interference information, which includes various interference instructions not supported by the RPMB. Use each interference instruction in the above second interference information to process the data write or read of the RPMB, and obtain the feedback result matching each interference instruction. If each feedback result indicates that the process fails, obtain the corresponding reference test result to indicate passing the corresponding test item; otherwise, obtain the corresponding reference test result to indicate failing the corresponding test item.
[0058] In a specific application scenario, the above second interference information can be a UFS protocol command not supported by the RPMB, etc.
[0059] In another implementation scenario, since both the read instruction and the write instruction matched by the RPMB are composed of multiple process sub-commands in a specified order, to avoid that in the actual processing, when multiple process sub-commands are waiting in the queue or multiple process sub-commands are processed concurrently, the process sub-commands corresponding to the read instruction or the write instruction fail to be issued in the specified order, thus affecting data reading or writing. Therefore, when the function information is read / write instruction information, a reliability test is performed on the RPMB based on the order of the process sub-commands in the read instruction and the write instruction. Specifically, after the function initialization of the RPMB, a third interference information is generated, and the third interference information includes at least one interference read instruction and at least one interference write instruction. The RPMB is used to read data by using the above interference read instruction to obtain a corresponding feedback result; and the RPMB is used to write data by using the above interference write instruction to obtain a corresponding feedback result.
[0060] Further, when the feedback result corresponding to the interference read instruction in the third interference information indicates that the data reading fails, and the feedback result corresponding to the interference write instruction in the third interference information indicates that the data writing fails, a corresponding reference test result is obtained to represent passing the corresponding test item; otherwise, a corresponding reference test result is obtained to represent failing the corresponding test item.
[0061] In a specific application scenario, in response to that the write instruction of the RPMB is sequentially composed of two SP Out (Security Protocol Out) and one SP In (Security Protocol In), and the read instruction of the RPMB is sequentially composed of one SP Out (Security Protocol Out) and one SP In (Security Protocol In), an interference write instruction generated is one SP Out, one SP In and one SP Out, and an interference read instruction generated is one SP In and one SP Out. The RPMB is used to write and read data respectively by using the above interference write instruction and interference read instruction, and corresponding feedback results are obtained.
[0062] In another implementation scenario, the read instruction and write instruction corresponding to the RPMB are respectively composed of multiple process sub-commands, and each process sub-command is matched with corresponding parameter information, which is used to represent the command specification value of the corresponding process sub-command. When the function information is the parameter information matched by the read-write instruction, in order to test the reliability of the RPMB during data writing or reading, after the function initialization of the RPMB, a fourth interference information is generated, and the fourth interference information includes an interference write instruction and an interference read instruction. Among them, the parameter information of each process sub-command in the above 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 interference write instruction is different from the corresponding command specification value. The RPMB is respectively written with data and read with data by using the above interference write instruction and interference read instruction, and the corresponding feedback results are obtained.
[0063] Further, when the feedback result corresponding to the interference read instruction in the fourth interference information indicates that the data reading fails, and the feedback result corresponding to the interference write instruction in the fourth interference information indicates that the data writing fails, the corresponding reference test result is obtained to represent passing the corresponding test item; otherwise, the corresponding reference test result is obtained to represent failing the corresponding test item.
[0064] In a specific application scenario, the write instruction of the RPMB is sequentially composed of two SP Out (Security Protocol Out) and one SP In (Security Protocol In), and the command specification values of the above process sub-commands are 0003h, 0005h, and 0300h in sequence; the read instruction of the RPMB is sequentially composed of one SP Out (Security Protocol Out) and one SP In (Security Protocol In), and among them, the command specification value of the process sub-command SP Out is 0004h. In order to test the reliability of the RPMB under different parameter information, an interference write instruction sequentially composed of two SP Out and one SP In is generated, the parameter information of the first SP Out is not equal to any value within 0003h, the parameter information of the second SP Out is not equal to any value within 0005h, and the parameter information of the SP In is not equal to any value within 0300h; and, an interference read instruction sequentially composed of one SP Out and one SP In is generated, and the parameter information of the SP Out is not equal to any value within 0004h.
[0065] In another implementation manner, Figure 1The specific implementation process of step S101 may further include: based on the function information, constructing a target sequence including at least one test item, testing the test items in the target sequence in sequence, and obtaining the reference test results matching the test items.
[0066] In an implementation scenario, when the function information includes storage capacity configuration information, count information matching the write instruction, and data reading information in the power-off state, a target sequence is constructed according to the above function information. The target sequence sequentially includes an abnormal storage capacity test item, a count test item, and a power-off test item. The test items in the target sequence are tested in sequence to obtain the corresponding reference test results.
[0067] Furthermore, on this basis, Figure 1 The specific implementation process of step S102 includes: in response to the reference test result matching the current test item not meeting the test pass condition, stopping the test and taking the first classification as the target screening classification matching the memory. Or, in response to the reference test results matching all test items meeting the test pass condition, taking the second classification as the target screening classification matching the memory.
[0068] Specifically, if the reference test result matching the current test item does not meet the test pass condition, the testing of subsequent test items will not continue, and it is considered that the corresponding memory does not meet the test pass condition, and the first classification is taken as the matching target screening classification. Or, if all test items are completed and the reference test results matching all test items meet the corresponding test pass conditions, the second classification is taken as the target screening classification matching the memory. Among them, the stability and reliability of the memory with the target screening classification of the second classification are better than those of the memory with the target screening classification of the first classification. By determining the target screening classification corresponding to the memory, the memory can be flexibly deployed in combination with the target screening classification and scenario requirements in actual applications. For example, for scenarios with higher reliability requirements, memories with the target screening classification of the second classification are deployed.
[0069] In yet another implementation manner, Figure 1 The specific implementation process of step S101 may further include: based on the function information, constructing a target sequence including at least one test item, testing each test item in the target sequence, and obtaining the reference test results matching the test items.
[0070] Furthermore, the implementation process of step S102 includes: obtaining the first quantity of reference test results that meet the corresponding test pass conditions. Based on the first quantity, determining the target screening classification matching the memory. The more the first quantity, the higher the target screening classification.
[0071] Specifically, by obtaining the first quantity of reference test results that meet the corresponding test pass conditions to determine the number of test items passed by the memory, and the more test items passed, the higher the reliability and stability of the memory, and then a higher target screening classification is assigned to it.
[0072] Please refer to Figure 4 , Figure 4 FIG. is a schematic structural diagram of an embodiment of the electronic device of the present application. The electronic device includes: a memory 10 and a processor 20 that are coupled to each other. Program instructions are stored in the memory 10, and the processor 20 is configured to execute the program instructions to implement the methods mentioned 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 herein. In addition, the processor 20 may also be referred to as a CPU (Center Processing Unit, central 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 devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Additionally, the processor 20 may be implemented jointly by integrated circuit chips.
[0073] Please refer to Figure 5 , Figure 5 FIG. is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. A program instruction 40 capable of being run by a processor is stored on the computer-readable storage medium 30, and when the program instruction 40 is executed by the processor, the methods mentioned in any of the above embodiments are implemented.
[0074] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division, and 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 displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0075] The unit described as a separation component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0076] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0077] 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, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs and other various media that can store program codes.
[0078] The above is only the embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A memory test and screening method, characterized in that Including: Based on function information matching a replay protection memory block (RPMB) in a memory, performing at least one function test on the RPMB to obtain a reference test result matching each function test; wherein, the function information includes at least one of storage capacity configuration information, count information matching a write instruction, and data read 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 function test, screening the memory to determine a target screening level matched by the memory.
2. The method according to claim 1, wherein The performing at least one function test on the RPMB based on function information matching the RPMB in the memory to obtain a reference test result matching each function 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 matching the write instruction, performing a count test on the RPMB to obtain a second reference test result; and Based on the data read information in the power-off state, performing a power-off test on the RPMB to obtain a third reference test result.
3. The method according to claim 2, wherein 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 multiple storage partitions, determining a test storage capacity based on a storage capacity threshold matched by each storage partition; wherein, the test storage capacity is greater than the storage capacity threshold; Based on the test storage capacity, generating a capacity configuration instruction matched by each storage partition; Based on the capacity configuration instruction, obtaining the first reference test result.
4. The method according to claim 2, characterized in that The performing a count test on the RPMB based on the count information matching the write instruction to obtain a second reference test result includes: Invoking a parameter modification component to use a target value as the current write count matched by the RPMB, and writing data based on the target value; Generating a read instruction, and using the read instruction to re-obtain the current write count; Obtaining a comparison result between the current write count and the target value, and based on the comparison result, obtaining a current reference test sub-result; Writing data based on the current write count, updating the target value using the current write count, returning to the step of generating the read instruction and using the read instruction to re-obtain the current write count until the target value reaches the maximum write count matched by the RPMB; Based on the current reference test sub-result, obtaining the second reference test result.
5. The method according to claim 4, characterized in that The obtaining a comparison result between the current write count and the target value, and based on the comparison result, obtaining a current reference test sub-result includes: In response to the target value being less than the maximum write count and the current write count being one plus the target value, determining that the current test round meets the 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 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, including: Obtaining a data write instruction for writing target data to the RPMB; wherein, the data write instruction includes a plurality of process sub-commands; Performing power-off and power-on operations in sequence in a state where some of the process sub-commands are not executed; Generating a data read instruction matching the data write instruction, and using the data read instruction to obtain actual read data; Obtaining the third reference test result based on the actual read data.
7. The method according to claim 1, wherein 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, the read / write instruction information, or the parameter information, performing at least one function test on the RPMB based on the function information matching the RPMB in the memory, and obtaining a reference test result matching each function test, including: Obtaining interference information corresponding to the function information and not supported by the RPMB, and using the interference information to trigger the function corresponding to the RPMB to obtain the feedback result of the RPMB; Obtaining the reference test result based on the feedback result.
8. The method according to claim 1, characterized in that, Performing at least one function test on the RPMB based on the function information matching the RPMB in the memory, and obtaining a reference test result matching each function test, including: Based on the function information, constructing a target sequence including at least one test item, and sequentially testing the test items in the target sequence to obtain a reference test result matching the test item; Screening the memory based on the reference test result matching each function test to determine the target screening level matching the memory, including: In response to the reference test result matching the current test item not meeting the test pass condition, stopping the test and taking the first level as the target screening level matching the memory; In response to the reference test results matching all the test items meeting the test pass condition, taking the second level as the target screening level matching the memory.
9. An electronic device, characterized in that, Including a memory and a processor coupled to each other, wherein program instructions are stored in the memory, and the processor is configured to execute the program instructions to implement the method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, Storing program instructions that can be run by a processor, and the program instructions are used to implement the method according to any one of claims 1-8.
Citation Information
Patent Citations
Function test method and device for RPMB in eMMC and computer equipment
CN112133356A
RPMB function test method and device, computer equipment and storage medium
CN116052755A
RPMB test method and device, computer equipment and storage medium
CN116524987A
RPMB regional performance test method and device based on UFS storage device
CN118471317A
Non-volatile memory with replay protected memory block having dual key
US20200014544A1