CN-121979727-A - Storage device testing method and storage device testing system
Abstract
The application discloses a storage device testing method and a storage device testing system, wherein the storage device testing method comprises the steps of sending a first instruction to a main control end firmware to trigger the main control end firmware to initialize a slave end firmware, sending a second instruction to the main control end firmware, generating a test data packet according to the second instruction by the main control end firmware, packaging the test data packet into a plurality of data units of an MCTP protocol and sending the data units to the corresponding slave end firmware, receiving and recombining all the data units into complete test instruction data by the slave end firmware, generating test result data after test operation is executed, packaging the test result data into the data units of the main control end firmware through the MCTP protocol, receiving and storing the test result data by the main control end firmware, and transmitting the test result to an upper computer for analysis and display through a third instruction. By the method, the test cost of the storage device is reduced.
Inventors
- WU XIANG
Assignees
- 深圳市时创意电子股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251224
Claims (10)
- 1. A method for testing a memory device, comprising the steps of: A first instruction is sent to a main control end firmware to trigger the main control end firmware to initialize a slave end firmware; Sending a second instruction to the main control end firmware, generating a test data packet by the main control end firmware according to the second instruction, packaging the test data packet into a plurality of data units of MCTP protocol, and issuing the data units to the corresponding auxiliary control end firmware; The slave firmware receives and reorganizes all data units into complete test instruction data, generates test result data after test operation is executed, packages the test result data into data units through an MCTP protocol, and returns the data units to the master firmware; And the main control terminal firmware receives and stores the test result data, and transmits the test result to the upper computer for analysis and display through a third instruction.
- 2. The method of claim 1, wherein the step of sending a first command to the master firmware to trigger the master firmware to initialize the slave firmware further comprises: Sending a first instruction to the main control terminal firmware to trigger the main control terminal firmware to initialize ARP protocol and MCTP protocol to the auxiliary terminal firmware so as to allocate unique SMBus address and MCTP port number to the corresponding auxiliary terminal firmware; Detecting and confirming whether the testing state of the slave firmware is normal; If the testing state of the slave firmware is judged to be normal, a second instruction is sent to the master firmware; Wherein the first instruction includes a vendor instruction 0xCF.
- 3. The storage device testing method of claim 2, wherein the first instruction polls the master firmware to detect an initialization state of the slave firmware, and triggers a subsequent test when the master firmware returns a successful status code.
- 4. The method for testing a storage device according to claim 3, wherein the step of sending a second instruction to the master firmware, generating a test data packet by the master firmware according to the second instruction, and encapsulating the test data packet into a plurality of data units of MCTP protocol and issuing the data units to the corresponding slave firmware further comprises: Generating MI IDENTIFY a test data packet after the main control terminal firmware receives the second instruction; the main control terminal firmware encapsulates MI IDENTIFY test data packets into a plurality of data units of MCTP protocols through the MCTP protocol; The master terminal firmware transmits the data units of a plurality of MCTP protocols to the corresponding slave terminal firmware through the SMBus address and the MCTP port number; Wherein the second instruction includes a vendor instruction 0xCB.
- 5. The method of claim 4 wherein after the master firmware generates the Identify test instruction data, the master firmware fragments the data units by MCTP protocol, and adds a fragment identifier and a check code to each of the data units.
- 6. The storage device testing method of claim 5, wherein the fragment identifier comprises a sequence number and/or a packet length, and the check code comprises a CRC check code or an MD5 hash value.
- 7. The method of claim 6 wherein after the slave firmware performs a test operation, encapsulating test result data, including test status codes and test parameter values, into data units by the MCTP port number and the SMBus address and returning the data units to the master firmware.
- 8. The method for testing a storage device according to claim 7, wherein the step of receiving and storing the test result data by the firmware at the master control end, and transmitting the test result to the upper computer for analysis and display by the third instruction further comprises: The main control terminal firmware stores the received test result data in a buffer area and detects whether the test state is normal or not; If the test state is detected to be normal, the third instruction is sent; Reading the test result stored in the buffer area to an upper computer for analysis according to the third instruction, and displaying the test result and the returned data packet; The third instruction includes a vendor instruction 0xCD.
- 9. A storage device testing system, comprising: the upper computer is used for sending an instruction to the main control end firmware; The main control end firmware is in communication connection with the upper computer, The master control end firmware initializes the slave end firmware according to the acquired first instruction sent by the upper computer; The main control terminal firmware encapsulates the generated test instruction data into a plurality of data units of MCTP protocols through the MCTP protocol according to the acquired second instruction sent by the upper computer, and transmits the data units to the corresponding auxiliary terminal firmware; the slave end firmware is in communication connection with the master end firmware, receives and reorganizes the data unit into complete test instruction data, generates test result data after test operation is executed, and packages the test result data into a data unit through an MCTP protocol to return to the master end firmware; and the main control terminal firmware stores the test result data, and transmits the test result to the upper computer for analysis and display according to a third instruction sent by the upper computer.
- 10. The system of claim 9, wherein the master firmware is provided with a buffer for temporarily storing test result data returned by the slave firmware, and a storage space of the buffer is matched with the number of the slave firmware and the test data length.
Description
Storage device testing method and storage device testing system Technical Field The present application relates to the field of chips, and in particular, to a method and a system for testing a storage device. Background The conventional testing method for the SSD solid state disk management interface (MANAGEMENT INTERFACE, hereinafter referred to as MI) is often based on the BMC (Baseboard Management Controller, on-board controller) test or on the professional test software (for example oakgate) test, but these tests all have the problem that the price of the testing equipment is high and complex, resulting in higher testing cost. Therefore, how to reduce the test cost of the storage device is a problem to be solved in the art. Disclosure of Invention The application discloses a storage device testing method and a storage device testing system, and aims to reduce the testing cost of storage devices. The embodiment of the application discloses a storage device testing method, which comprises the following steps: A first instruction is sent to a main control end firmware to trigger the main control end firmware to initialize a slave end firmware; Sending a second instruction to the main control end firmware, generating a test data packet by the main control end firmware according to the second instruction, packaging the test data packet into a plurality of data units of MCTP protocol, and issuing the data units to the corresponding auxiliary control end firmware; The slave firmware receives and reorganizes all data units into complete test instruction data, generates test result data after test operation is executed, packages the test result data into data units through an MCTP protocol, and returns the data units to the master firmware; And the main control terminal firmware receives and stores the test result data, and transmits the test result to the upper computer for analysis and display through a third instruction. Optionally, the step of sending a first instruction to the master end firmware to trigger the master end firmware to initialize the slave end firmware further includes: Sending a first instruction to the main control terminal firmware to trigger the main control terminal firmware to initialize ARP protocol and MCTP protocol to the auxiliary terminal firmware so as to allocate unique SMBus address and MCTP port number to the corresponding auxiliary terminal firmware; Detecting and confirming whether the testing state of the slave firmware is normal; If the testing state of the slave firmware is judged to be normal, a second instruction is sent to the master firmware; Wherein the first instruction includes a vendor instruction 0xCF. Optionally, the first instruction polls the master firmware to detect an initialization state of the slave firmware, and triggers a subsequent test when the master firmware returns a successful status code. Optionally, the step of sending a second instruction to the master end firmware, generating, by the master end firmware, a test data packet according to the second instruction, and encapsulating the test data packet into a plurality of data units of MCTP protocol and sending the data units to the corresponding slave end firmware further includes: Generating MI IDENTIFY a test data packet after the main control terminal firmware receives the second instruction; the main control terminal firmware encapsulates MI IDENTIFY test data packets into a plurality of data units of MCTP protocols through the MCTP protocol; The master terminal firmware transmits the data units of a plurality of MCTP protocols to the corresponding slave terminal firmware through the SMBus address and the MCTP port number; Wherein the second instruction includes a vendor instruction 0xCB. Optionally, after the master control end generates the Identify test instruction data, the master control end fragments the Identify test instruction data into a plurality of data units through an MCTP protocol, and adds a fragment identifier and a check code in each data unit. Optionally, the fragment identifier includes a sequence number and/or a packet length, and the check code includes a CRC check code or an MD5 hash value. Optionally, after the slave firmware executes the test operation, the test result data is encapsulated into a data unit through the MCTP port number and the SMBus address and returned to the master firmware, where the test result data includes a test status code and a test parameter value. Optionally, the step of receiving and storing the test result data by the firmware at the main control end, and transmitting the test result to the upper computer for analysis and display by the third instruction further includes: The main control terminal firmware stores the received test result data in a buffer area and detects whether the test state is normal or not; If the test state is detected to be normal, the third instruction is sent; Reading the test result stored in the buffer area to an u