CN118409964A - Solid state disk firmware debugging method, system, device, computer equipment and storage medium - Google Patents
Solid state disk firmware debugging method, system, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN118409964A CN118409964A CN202410544560.7A CN202410544560A CN118409964A CN 118409964 A CN118409964 A CN 118409964A CN 202410544560 A CN202410544560 A CN 202410544560A CN 118409964 A CN118409964 A CN 118409964A
- Authority
- CN
- China
- Prior art keywords
- debugging
- solid state
- state disk
- target
- debugged
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3644—Debugging of software by instrumenting at runtime
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3648—Debugging of software using additional hardware
- G06F11/3656—Debugging of software using additional hardware using a specific debug interface
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to the technical field of hard disk debugging and discloses a solid state disk firmware debugging method, a system, a device, computer equipment and a storage medium, wherein the method comprises the following steps: obtaining a debugging command from a control host; converting the format of the debug command to obtain a target debug command with a first preset protocol format, wherein the first preset protocol format is a protocol format supported by an idle interface; sending a target debugging command to a solid state disk to be debugged; obtaining response data corresponding to a target debugging command from the solid state disk to be debugged, and performing format conversion on the response data to obtain target response data in a second preset protocol format; and sending the target response data to the control host, and indicating the control host to position the firmware problem according to the target response data under the condition that the firmware problem exists in the solid state disk to be debugged. The invention solves the problems of inaccurate positioning and low positioning efficiency of the firmware problem in the process of debugging the solid state disk firmware.
Description
Technical Field
The invention relates to the technical field of hard disk debugging, in particular to a solid state disk firmware debugging method, a solid state disk firmware debugging system, a solid state disk firmware debugging device, computer equipment and a storage medium.
Background
In the process of developing Solid state disk (Solid STATE DRIVES, SSD) firmware, debugging is needed to be carried out on the Solid state disk firmware, the numerical value of a certain variable or hardware register of the firmware hard disk is checked, the firmware possibly has a fault problem, at the moment, the problem of the firmware is needed to be positioned, and a plurality of numerical values are obtained to assist in carrying out flow positioning.
At present, the means for positioning the firmware problems are often used for positioning and solving the problems by means of collecting logs, adding printing, retesting and reproducing, analyzing the logs and the like, however, the positioning efficiency of the means is low, the means cannot be positioned at all, any problem can occur in the testing process, if the first site is lost, the problem is difficult to reproduce subsequently, and the problem positioning is more complex. In addition, if special simulation debugging equipment is adopted to debug the solid state disk firmware, the equipment of the solid state disk is normally operated in the daily use process, the simulation debugging equipment cannot be connected, if the firmware has a problem, the solid state disk equipment is reset after the simulation debugging equipment is connected, field data can be lost, and the problem is difficult to accurately locate.
Therefore, the related technology has the problems of inaccurate positioning and low positioning efficiency of the firmware problem in the process of debugging the solid state disk firmware.
Disclosure of Invention
In view of the above, the invention provides a method, a system, a device, a computer device and a storage medium for debugging solid state disk firmware, so as to solve the problems of inaccurate positioning and low positioning efficiency of firmware problems in the process of debugging the solid state disk firmware.
In a first aspect, the present invention provides a method for debugging firmware of a solid state disk, where the method is applied to debugging a connection device, and the method includes:
Obtaining a debugging command from a control host, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged, and a debugging connection device is connected with an idle interface of the solid state disk to be debugged;
converting the format of the debug command to obtain a target debug command with a first preset protocol format, wherein the first preset protocol format is a protocol format supported by an idle interface;
Sending a target debugging command to a solid state disk to be debugged;
Obtaining response data corresponding to a target debugging command from the solid state disk to be debugged, and performing format conversion on the response data to obtain target response data in a second preset protocol format;
And sending the target response data to the control host, and indicating the control host to position the firmware problem according to the target response data under the condition that the firmware problem exists in the solid state disk to be debugged.
According to the solid state disk firmware debugging method, the debugging connection equipment is connected with the idle interface of the solid state disk to be debugged, and the control host realizes communication with the solid state disk to be debugged through the debugging connection equipment. The idle interface of the solid state disk to be debugged is utilized, the normal operation of the solid state disk to be debugged is not affected in the debugging process, the control computer can acquire corresponding target data in real time, the firmware problem is accurately and efficiently positioned, and the debugging cost is reduced. The problem of inaccurate positioning and low positioning efficiency of firmware problems in the process of debugging the solid state disk firmware is solved.
In some optional embodiments, obtaining response data corresponding to the target debug command from the solid state disk to be debugged, and performing format conversion on the response data to obtain target response data in a second preset protocol format, where the converting includes:
generating a data acquisition strategy;
acquiring response data from the solid state disk to be debugged according to a data acquisition strategy;
Storing the response data;
judging whether the control host and the debugging connection equipment are in a connection state or not;
If the control host is in a connection state with the debugging connection equipment, judging whether the control host is in a receiving state or not;
If the control host is in a receiving state, format conversion is carried out on the response data according to a second preset protocol format, and target response data are obtained.
In this embodiment, the debug connection device generates a data acquisition policy, so that the debug connection device can autonomously acquire response data, store the response data, push information of the response data to the control host when the control host is in a receiving state, and the control host can complete debugging of the solid state disk firmware without maintaining the connection state all the time.
In a second aspect, the invention provides a solid state disk firmware debugging method, which is applied to a solid state disk to be debugged, and comprises the following steps:
Acquiring a target debugging command in a first preset protocol format from a debugging connection device, and executing the target debugging command, wherein the debugging connection device is connected with an idle interface of a solid state disk to be debugged, and the first preset protocol format is a protocol format supported by the idle interface;
acquiring an execution result of a target debugging command and a firmware state of a solid state disk to be debugged;
generating response data corresponding to the target debugging command according to the execution result and the firmware state;
The method comprises the steps of sending response data to the debugging connection equipment, and indicating the debugging connection equipment to forward information contained in the response data to the control host, and locating firmware problems of the solid state disk to be debugged by the control host, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged.
According to the solid state disk firmware debugging method, the solid state disk to be debugged generates response data, the response data is fed back to the debugging connecting device through the idle interface, and the debugging connecting device forwards information contained in the response data to the control host, so that the control host can conveniently position firmware problems. The idle interface of the solid state disk to be debugged is utilized, the normal operation of the solid state disk to be debugged is not affected in the debugging process, the control computer can acquire corresponding target data in real time, the firmware problem is accurately and efficiently positioned, and the debugging cost is reduced. The problem of inaccurate positioning and low positioning efficiency of firmware problems in the process of debugging the solid state disk firmware is solved.
In some alternative embodiments, obtaining a target debug command in a first preset protocol format from a debug connection device and executing the target debug command includes:
judging the communication state of the debugging connecting device, wherein the communication state comprises a receiving state and a sending state;
if the debug connection device is in a send state, invoking a receive processing function to execute the target debug command, wherein invoking the receive processing function to execute the target debug command includes:
obtaining a target debug command from a debug connection device;
acquiring a first equipment address of a solid state disk to be debugged;
judging whether the second equipment address designated by the target debugging command is consistent with the first equipment address;
If the second device address is consistent with the first device address, determining a preset debugging command set, and matching the target debugging command with the preset debugging command in the preset debugging command set;
If the matching fails, generating an error code, and returning the error code to the debugging connection equipment;
if the matching is successful, executing the target debugging command;
If the debug connection device is in a receiving state, calling a sending processing function to execute a target debug command, wherein the calling the sending processing function to execute the target debug command comprises:
acquiring target data corresponding to a target debugging command;
Judging whether the debugging connecting device performs the reading operation or not, and if so, sending the target data to the debugging connecting device.
In this embodiment, the communication state of the debug connection device is determined, if the debug connection device is in the transmission state, the receiving processing function is called to execute the target debug command, otherwise, the transmitting processing function is called to execute the target debug command, so that the firmware can be debugged through the universal idle interface, the universality is achieved, and the development and learning costs can be reduced.
In some alternative embodiments, prior to obtaining the target debug command in the first preset protocol format from the debug connection device, the method further comprises:
acquiring executable codes, wherein the executable codes comprise a receiving processing function and a sending processing function;
Writing executable codes into a solid state disk processor of a solid state disk to be debugged, and enabling the solid state disk processor to be used as a slave of a debugging connection device, wherein the solid state disk processor is used for calling a receiving processing function or a sending processing function;
and controlling the solid state disk processor to enter an operating state.
In a third aspect, the present invention provides a solid state disk firmware debug system, including: debugging the connecting equipment and the solid state disk to be debugged;
The debugging connecting device is connected with an idle interface of the solid state disk to be debugged;
the debug connection device is configured to execute the solid state disk firmware debug method of the first aspect or any implementation manner corresponding to the first aspect, or execute the solid state disk firmware debug method of the second aspect or any implementation manner corresponding to the second aspect;
The solid state disk to be debugged is used for executing the solid state disk firmware debugging method of the first aspect or any corresponding implementation mode thereof, or executing the solid state disk firmware debugging method of the second aspect or any corresponding implementation mode thereof.
According to the solid state disk firmware debugging system provided by the embodiment, the debugging connection equipment is connected with the idle interface of the solid state disk to be debugged, and the control host realizes communication with the solid state disk to be debugged through the debugging connection equipment. The solid state disk to be debugged generates response data, the response data is fed back to the debugging connection equipment through the idle interface, and the debugging connection equipment forwards information contained in the response data to the control host, so that the control host can conveniently locate firmware problems. The idle interface of the solid state disk to be debugged is utilized, the normal operation of the solid state disk to be debugged is not affected in the debugging process, the control computer can acquire corresponding target data in real time, the firmware problem is accurately and efficiently positioned, and the debugging cost is reduced. The problem of inaccurate positioning and low positioning efficiency of firmware problems in the process of debugging the solid state disk firmware is solved.
In some alternative embodiments, the control host is connected to a communication interface of the debug connection device; the control host comprises debugging software and a driver; the debugging connection device comprises a controller and a storage module;
The debugging software is used for generating a debugging command and sending the debugging command to the debugging connecting device through a driver, wherein the driver is used for identifying the debugging connecting device;
The controller is used for generating a data acquisition strategy and acquiring response data from the solid state disk to be debugged according to the data acquisition strategy;
the storage module is used for storing the response data.
In a fourth aspect, the present invention provides a solid state disk firmware debugging device, where the device is disposed in a debugging connection apparatus, and includes:
the first acquisition module is used for acquiring a debugging command from the control host, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged, and the debugging connection equipment is connected with an idle interface of the solid state disk to be debugged;
the first format conversion module is used for carrying out format conversion on the debug command to obtain a target debug command with a first preset protocol format, wherein the first preset protocol format is a protocol format supported by the idle interface;
The first sending module is used for sending the target debugging command to the solid state disk to be debugged;
the second format conversion module is used for acquiring response data corresponding to the target debugging command from the solid state disk to be debugged, and converting the format of the response data to obtain target response data in a second preset protocol format;
the second sending module is used for sending the target response data to the control host, and indicating the control host to locate the firmware problem according to the target response data under the condition that the firmware problem exists in the solid state disk to be debugged.
In a fifth aspect, the present invention provides a solid state disk firmware debugging device, where the device is deployed on a solid state disk to be debugged, and the device includes:
The second acquisition module is used for acquiring a target debugging command in a first preset protocol format from the debugging connection equipment and executing the target debugging command, wherein the debugging connection equipment is connected with an idle interface of the solid state disk to be debugged, and the first preset protocol format is a protocol format supported by the idle interface;
The third acquisition module is used for acquiring an execution result of the target debugging command and a firmware state of the solid state disk to be debugged;
The generating module is used for generating response data corresponding to the target debugging command according to the execution result and the firmware state;
the third sending module is used for sending the response data to the debugging connection equipment and indicating the debugging connection equipment to forward the information contained in the response data to the control host, and the control host is used for positioning the firmware problem of the solid state disk to be debugged, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged.
In a sixth aspect, the present invention provides a computer device comprising: the processor executes the computer instructions, thereby executing the solid state disk firmware debugging method of the first aspect or any corresponding implementation mode thereof, or executing the solid state disk firmware debugging method of the second aspect or any corresponding implementation mode thereof.
In a seventh aspect, the present invention provides a computer readable storage medium, where computer instructions are stored on the computer readable storage medium, where the computer instructions are configured to cause a computer to execute the solid state hard disk firmware debugging method according to the first aspect or any embodiment corresponding to the first aspect, or execute the solid state hard disk firmware debugging method according to the second aspect or any embodiment corresponding to the second aspect.
In an eighth aspect, the present invention provides a computer program product, including computer instructions, where the computer instructions are configured to cause a computer to execute the solid state hard disk firmware debugging method of the first aspect or any implementation manner corresponding to the first aspect, or execute the solid state hard disk firmware debugging method of the second aspect or any implementation manner corresponding to the second aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the related art, the drawings that are required to be used in the description of the embodiments or the related art will be briefly described, and it is apparent that the drawings in the description below are some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a schematic diagram of a configuration interface data acquisition and configuration channel according to an embodiment of the present invention;
FIG. 2 is a flow chart of a solid state disk firmware debugging method applied to debugging a connected device according to an embodiment of the invention;
FIG. 3 is a block diagram of a solid state disk firmware debug system according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for debugging solid state disk firmware applied to a debug connection device according to an embodiment of the present invention;
FIG. 5 is a flow chart of a solid state disk firmware debugging method applied to a solid state disk to be debugged according to an embodiment of the invention;
FIG. 6 is a schematic flow chart of obtaining a target debug command for a solid state disk to be debugged according to an embodiment of the present invention;
FIG. 7 is a flow diagram of a receive processing function executing a target debug command in accordance with an embodiment of the present invention;
FIG. 8 is a flow diagram of a send processing function executing a target debug command in accordance with an embodiment of the present invention;
FIG. 9 is a block diagram of a solid state disk firmware debugging apparatus deployed at a debug connection device in accordance with an embodiment of the present invention;
FIG. 10 is a block diagram of a solid state disk firmware debugging device deployed on a solid state disk to be debugged according to an embodiment of the present invention;
fig. 11 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The current general means for online debugging of the solid state disk is that a processor architecture of a debug object is an Arm (ADVANCED RISC MACHINE, advanced simplified instruction set computer) architecture as shown in fig. 1 by a special simulation debugging device, and the debug object is the solid state disk. The simulator (DSTREAM-ST) provides a simulation environment for debugging the solid state disk firmware, JTAG (Joint Test Action Group ) 20 interface or CORESIGHT interface is adopted between the simulator and a debugging object for communication, CORESIGHT is an infrastructure which can debug, monitor and optimize the performance of the complete system on chip design. The host (PC) is used for debugging the solid state disk firmware, and the host and the emulator are communicated through a universal serial bus (Universal Serial Bus, USB) or Ethernet. However, in the daily use process, the solid state disk is normally operated and cannot be connected with the simulation debugging equipment, if the solid state disk firmware has a problem, the problem of positioning the simulation debugging equipment is often caused by resetting the equipment, losing field data and being difficult to accurately position. In addition, the debugging means are designed for the solid state disk adopting the specific architecture controller, the debugging is required to be performed under a special environment, the power cannot be turned off in the debugging process, the link cannot be disconnected, the simulation environment also needs to run continuously, the debugging and learning cost is high, and the debugging modes are not uniform. Given the problems encountered during testing, firmware problems cannot be located in the manner described above. And the simulators are expensive and cannot be used in batches.
The embodiment of the invention provides a solid state disk firmware debugging method, which is used for connecting a control HOST (HOST) for debugging a solid state disk to a hard disk controller of the solid state disk to be debugged through debugging connecting equipment. The debugging connection device is used as a communication HOST device of the hard disk processor, actively initiates communication and receives data from the hard disk processor, has certain storage capacity, has certain logic processing capacity, can receive a debugging command from HOST, runs autonomously, continuously acquires data of a certain address of the hard disk processor, and positions the problem according to the acquired data when the solid state disk firmware has the problem. And 3, completing the debugging of the solid state disk through the cooperation of HOST, the debugging connecting device and the hard disk processor. The method and the device have the advantages that the firmware problem is accurately and efficiently positioned in the process of debugging the solid state disk firmware, and the debugging cost is reduced.
According to an embodiment of the present invention, a solid state disk firmware debugging method embodiment is provided, and it should be noted that, steps shown in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and although a logic sequence is shown in the flowchart, in some cases, steps shown or described may be performed in a sequence different from that shown or described herein.
The solid state disk firmware debugging method provided by the embodiment can be applied to computer equipment for debugging the solid state disk firmware, such as a computer, a server and the like. Fig. 2 is a flowchart of a method for debugging firmware of a solid state disk according to an embodiment of the present invention, where the method is applied to debugging a connection device, as shown in fig. 2, and the flowchart includes the following steps.
Step S201, obtaining a debugging command from a control host, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged, and the debugging connection equipment is connected with an idle interface of the solid state disk to be debugged.
Specifically, in order to view the value of a certain variable or a hardware register, debugging the firmware of the solid state disk to be debugged generally needs to perform problem location if the firmware has problems, and obtains a plurality of values to assist in performing flow location.
The solid state disk firmware debugging method is jointly realized by debugging connection equipment of a solid state disk firmware debugging system and a solid state disk to be debugged, and the solid state disk firmware debugging system (hereinafter referred to as a debugging system) is shown in fig. 3. The debug system includes debug connection device ② and solid state disk ③ to be debugged, the debug connection device is connected with an idle interface of the solid state disk to be debugged, for example: the I3C (advanced INTER INTEGRATED Circuit) interface may communicate with the solid state disk to be debugged through an I3C Bus, and in addition, the debug connection device may communicate with the solid state disk to be debugged through a PCIe (PERIPHERAL COMPONENT INTERCONNECT EXPRESS, a high-speed serial computer expansion Bus standard) Bus, an SMBUS (SYSTEM MANAGEMENT Bus, a system management Bus) Bus, an I2C (Inter-INTEGRATED CIRCUIT, an integrated Circuit Bus) Bus, and so on, where the idle interface may also be a PCIe interface, an SMBUS interface, an I2C interface, and so on. Because the I3C bus can realize communication by only 2 wires, and the communication speed can reach 12.5MHz, the I3C bus can be preferably selected.
The debugging system further comprises a control host ①, wherein the control host can be a PC (Personal Computer ) or a server, and the control host is connected with the solid state disk to be debugged through debugging connection equipment, so that the purpose of debugging firmware and positioning problems of the solid state disk to be debugged can be achieved. The debugging connection device communicates with the control host through USB or Ethernet. The debug connection device obtains a debug command from the control host, for example: writing data into the memory, reading out the memory data, writing a register, reading out a general purpose register, and the like.
When the idle interface of the solid state disk to be debugged is an I3C interface, the solid state disk processor is used as a communication slave of the debugging connection device by the I3C function of the solid state disk processor, and a debugging command forwarded by the debugging connection device is received, and it is to be noted that the hard disk processor is responsible for implementing the hard disk service, and the processor architecture in fig. 1 is the architecture of the hard disk processor, for example, an ARM.
Step S202, converting the format of the debug command to obtain a target debug command with a first preset protocol format, wherein the first preset protocol format is a protocol format supported by the idle interface.
Specifically, because the interface for communication between the debug connection device and the control host is different from the interface for communication between the debug connection device and the solid state disk to be debugged, the communication protocol formats respectively supported are also different. Before the debug connection device forwards the debug command issued by the control host to the solid state disk to be debugged, the debug command needs to be subjected to format conversion, and the debug command is converted into a command protocol format agreed with the solid state disk to be debugged, namely a protocol format supported by an idle interface, so that a target debug command is obtained, and the solid state disk to be debugged can conveniently identify the debug command and execute the debug command.
And step S203, a target debugging command is sent to the solid state disk to be debugged.
Specifically, the target debug command after format conversion is sent to the solid state disk to be debugged, the solid state disk to be debugged recognizes the target debug command and executes the target debug command, and response information is generated and fed back according to the execution result of the target debug command and the firmware state after the target debug command is executed.
Step S204, response data corresponding to the target debug command is obtained from the solid state disk to be debugged, format conversion is carried out on the response data, and target response data in a second preset protocol format is obtained through conversion.
Specifically, the debugging connection device acquires feedback response data from the solid state disk to be debugged. Because the interface for communication between the debug connection device and the control host is different from the interface for communication between the debug connection device and the solid state disk to be debugged, the debug connection device needs to perform format conversion on the response data according to a second preset protocol format agreed by the debug connection device and the control host, so as to obtain target response data in the second preset protocol format.
Step S205, the target response data is sent to the control host, and the control host is instructed to locate the firmware problem according to the target response data under the condition that the firmware problem exists in the solid state disk to be debugged.
Specifically, the target response data is sent to the control host to complete the debugging of the solid state disk. The control host can judge whether the solid state disk to be debugged has firmware problems according to the target response data, if yes, the firmware problems can be accurately positioned according to the target response data as the target response data is the field data when the firmware problems occur.
According to the solid state disk firmware debugging method, the debugging connection equipment is connected with the idle interface of the solid state disk to be debugged, and the control host realizes communication with the solid state disk to be debugged through the debugging connection equipment. The idle interface of the solid state disk to be debugged is utilized, the normal operation of the solid state disk to be debugged is not affected in the debugging process, the control computer can acquire corresponding target data in real time, the firmware problem is accurately and efficiently positioned, and the debugging cost is reduced. The problem of inaccurate positioning and low positioning efficiency of firmware problems in the process of debugging the solid state disk firmware is solved.
The embodiment provides another solid state disk firmware debugging method, which can be applied to computer equipment for debugging solid state disk firmware, such as a computer, a server and the like. Fig. 4 is a flowchart of a solid state disk firmware debugging method according to an embodiment of the present invention, which is applied to debugging a connection device, as shown in fig. 4, and the flowchart includes the following steps.
Step S401, obtaining a debugging command from a control host, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged, and the debugging connection equipment is connected with an idle interface of the solid state disk to be debugged.
Please refer to step S201 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S402, converting the format of the debug command to obtain a target debug command with a first preset protocol format, wherein the first preset protocol format is a protocol format supported by the idle interface.
Please refer to step S202 in the embodiment shown in fig. 2, which is not described herein.
Step S403, the target debug command is sent to the solid state disk to be debugged.
Please refer to step S203 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S404, response data corresponding to the target debug command is obtained from the solid state disk to be debugged, and format conversion is carried out on the response data to obtain target response data in a second preset protocol format.
Specifically, step S404 "obtain response data corresponding to the target debug command from the solid state disk to be debugged, and perform format conversion on the response data, where the conversion results in target response data in the second preset protocol format" includes the following steps S4041 to S4046.
In step S4041, a data acquisition policy is generated.
And step S4042, obtaining response data from the solid state disk to be debugged according to the data obtaining strategy.
Step S4043, storing the response data.
Step S4044, determine whether the control host and the debug connection device are in a connection state.
In step S4045, if the control host is in a connection state with the debug connection device, it is determined whether the control host is in a receiving state.
Step S4046, if the control host is in the receiving state, format conversion is performed on the response data according to the second preset protocol format, so as to obtain the target response data.
In this embodiment, the debug converting device and the solid state disk processor of the solid state disk to be debugged adopt I3C bus communication, and at this time, the debug converting device is a communication host device of the solid state disk processor, and the communication host device can actively initiate communication, receive response data from the solid state disk processor, and perform format conversion on the response data. The debugging conversion equipment has certain logic processing capability, can receive the command from the control host and autonomously operate, for example, continuously acquire the data of a certain address of the hard disk processor. The debug converting device also needs to have certain storage capacity, and can temporarily store response data which is not acquired by the control host, and push the data to the control host at proper time.
Specifically, in the process of debugging the solid state disk firmware, the control host is not necessarily always connected with the debugging connection device, so that the debugging connection device needs to have a basic offline operation function, and the control host is used for configuration of specific offline operation. Therefore, the debugging connection equipment has certain logic operation capability, can receive a command from a control host, autonomously operates to generate a data acquisition strategy, autonomously communicates with and controls the solid state disk controller according to the data acquisition strategy, and acquires response data from the solid state disk to be debugged.
In addition, the debugging connection device has certain storage capacity and can temporarily store response data which is not acquired by the control host. After the response data is stored, the debugging connecting device firstly judges whether the control host and the debugging connecting device are in a connecting state, and if the control host and the debugging connecting device are not in the connecting state, the response data is continuously stored; if the control host is in the connection state, further judging whether the control host is in the receiving state, if the control host is in the receiving state, currently, the control host is at a proper time for pushing the response data, and the debugging connection equipment performs format conversion on the response data according to a second preset protocol format to obtain target response data, and pushes the target response data to the control host.
The debug connection device is a device in which a control HOST (HOST) is connected to the solid state disk controller, and the debug connection device is provided with two interfaces, one is a USB interface connected to the HOST, and the other is a communication interface connected to an idle interface of the solid state disk controller, and a communication protocol supported by the communication interface is consistent with the idle interface, for example: I3C, I C, etc. The invention requires the controller of the debugging connection device to be provided with a communication interface hardware peripheral, and if not, GPIO (General-purpose input/output) can be used for simulation, and the simulation of I2C by using the GPIO comprises the steps A1 to A8.
Step A1, determining GPIO pins: first, determine the GPIO pin you will use to emulate an I2C communication. Typically, you need to select two GPIO pins to emulate SDA (data line) and SCL (clock line).
Step A2, configuring GPIO pins: the selected GPIO pins are configured to the desired input and output modes. The mode and state of the pins are set using the programming language you select and the GPIO bank.
Step A3, realizing an I2C communication protocol: the I2C communication protocol is implemented using a GPIO library or custom function provided by a programming language. You need to write code to handle start conditions, stop conditions, address transfer, data transfer, etc.
Step A4, start and stop conditions: the start and stop conditions were simulated on GPIO. The starting condition is to transition SDA from high to low while SCL is held high. The stop condition is to transition SDA from low to high while SCL is held high.
Step A5, address transmission: the level state of the GPIO control pin is used to simulate the transmission of an I2C address. According to the I2C protocol specification, each bit of a 7-bit or 10-bit address is sent, and a corresponding level state is set on the SDA bit by bit.
Step A6, data transmission: the level state of the GPIO control pin is used to simulate the transmission of data. According to the I2C protocol specification, the level state of data is set on the SDA bit by bit, and the SCL is used to generate a clock signal to synchronize data transmission.
Step A7, response bit: according to the I2C protocol specification, the primary device will release the SDA line after transmitting data and then wait for the secondary device to transmit a reply bit. You need to check the state of the level on the SDA to determine if a reply bit is received.
Step A8, clock control: the level state of the SCL pin is controlled using GPIO to generate a clock signal. You need to control the frequency and duty cycle of the SCL according to the requirements of the I2C communication rate.
The I3C bus and the I2C bus also need only 2 wires to communicate, and the communication rate is higher than that of the I2C and can reach 12.5MHZ, and the GPIO can be used for simulating the I3C in a similar manner to the steps A1 to A8.
In this embodiment, the debug connection device generates a data acquisition policy, so that the debug connection device can autonomously acquire response data, store the response data, push information of the response data to the control host when the control host is in a receiving state, and the control host can complete debugging of the solid state disk firmware without maintaining the connection state all the time.
Step S405, the target response data is sent to the control host, and the control host is instructed to locate the firmware problem according to the target response data under the condition that the firmware problem exists in the solid state disk to be debugged.
Please refer to step S205 in the embodiment shown in fig. 2 in detail, which is not described herein.
The embodiment provides a solid state disk firmware debugging method which can be applied to a solid state disk to be debugged. Fig. 5 is a flowchart of a method for debugging firmware of a solid state disk according to an embodiment of the present invention, where the method is applied to a solid state disk to be debugged, and as shown in fig. 5, the flowchart includes the following steps.
Step S501, a target debug command in a first preset protocol format is obtained from a debug connection device, and the target debug command is executed, wherein the debug connection device is connected with an idle interface of a solid state disk to be debugged, and the first preset protocol format is a protocol format supported by the idle interface.
Specifically, a debug interface, i.e. an idle interface, is designed according to hardware resources of the solid state disk, the solid state disk to be debugged is connected with the debug connection device through the idle interface, and the debug interface includes: the I3C peripheral interface of the hard disk processor is typically 2 pins, which are fixed, and the design pins of the I3C peripheral interface of each hard disk processor may be different.
The method comprises the steps that a hard disk processor of a solid state disk to be debugged obtains a target debugging command in a first preset protocol format from debugging connection equipment through an idle interface, and the hard disk processor can identify and execute the target debugging command because of the protocol format supported by the idle interface when the first preset protocol format is adopted.
In some alternative embodiments, step S501 "obtain a target debug command in a first preset protocol format from a debug connection device, and execute the target debug command" includes the following steps B1 to B3.
And B1, judging the communication state of the debugging connection equipment, wherein the communication state comprises a receiving state and a sending state.
And step B2, if the debugging connecting device is in a sending state, calling a receiving processing function to execute the target debugging command. The step B21 to the step B26 are specifically included in the step B21.
Step B21, acquiring a target debug command from the debug connection apparatus.
And step B22, obtaining a first equipment address of the solid state disk to be debugged.
Step B23, judging whether the second device address specified by the target debug command is consistent with the first device address.
And step B24, if the second device address is consistent with the first device address, determining a preset debugging command set, and matching the target debugging command with the preset debugging command in the preset debugging command set.
And step B25, if the matching fails, generating an error code and returning the error code to the debugging connection device.
Step B26, if the matching is successful, executing the target debug command.
And step B3, if the debugging connecting device is in a receiving state, calling a sending processing function to execute the target debugging command. The step B31 to the step B32 specifically include the following steps.
And step B31, obtaining target data corresponding to the target debugging command.
And step B32, judging whether the debugging connecting device performs a read operation, and if so, transmitting the target data to the debugging connecting device.
In this embodiment, the present invention designs a slave service function of the hard disk processor I3C, and burns the slave service function into the hard disk processor, so that the hard disk processor becomes a slave of the debug connection device, and can only passively communicate with the debug connection device, and the specific function of the slave service function is to communicate with the debug device according to a customized protocol specification. At this time, the I3C interface of the hard disk processor is only a simple communication peripheral, and the slave service function is a service processing function of the system, and is responsible for receiving a target debug command (converted and forwarded by the debug connection device format) from the control host, and sending out data required by the control host.
Specifically, when the hard disk processor receives data from the debug connection device through the I3C interface, the hard disk processor needs to determine a communication state of the debug connection device, determine whether the debug connection device is in a receiving state or a transmitting state, and call a corresponding transmitting processing function or receiving processing function. As shown in FIG. 6, the hard disk processor receives the I3C IRQ (Interrupt Request ), the I3C IRQ is an I3C logic control code, the I3C peripheral interface of the hard disk processor judges whether the connection device is in a transmitting state or a receiving state when debugging, if the connection device is in the receiving state, the transmission processing function is called, and if the connection device is in the transmitting state, the reception processing function is called, and the process is ended.
If the debugging connecting device is in a sending state, the hard disk processor calls a receiving processing function to execute a target debugging command, and the process of receiving the target debugging command by the processing function comprises the following steps:
Firstly judging whether an address formulated by a target debugging command is an address of an I3C peripheral interface of the hard disk processor, comprising: obtaining a target debugging command from the debugging connection device, obtaining a first device address of the solid state disk to be debugged, judging whether a second device address designated by the target debugging command is consistent with the first device address, and if the second device address is inconsistent with the first device address, indicating that the address accessed by the debugging connection device through the I3C is not the address of the current solid state disk to be debugged, ignoring access. If the second device address is consistent with the first device address, the solid state disk controller will start to receive the target debug command from the debug connection device and judge whether the target debug command instructs illegality, the invention defines a plurality of debug commands in the design stage, if the received target debug command is not one of the established debug commands, the invention judges illegality, including: determining a preset debugging command set, and matching the target debugging command with the preset debugging command in the preset debugging command set. If the matching fails, generating an error code, returning the error code to the debugging connecting equipment, and setting the specific content of the error code according to actual requirements. And if the matching is successful, executing the target debugging command. Target debug commands such as: writing data into the memory, reading the memory data, writing a register, reading the register and reading a general register, wherein the memory reading and writing operation can modify or track a certain variable value according to a file when the firmware is compiled, so as to achieve the aim of variable injection debugging; the register reading and writing operation can be performed to configure and monitor other peripheral equipment or hardware resources; the general purpose register operation is read, and the general purpose register of the current processor can be read. The processor runs the code through the general register, the general register can indicate that the current code is run to the code, the stack service condition of the current task is used, and the simulation effect of the special simulator can be completely achieved through the operation. The above process is as shown in fig. 7, receiving data, judging whether the designated address is a device address, if not, ignoring the target debug command, and ending; if yes, receiving a target debugging command, judging whether the target debugging command is legal or not, if not, returning an error, and ending. If the data is legal, the data is received, the instruction is executed, the execution result is returned, and the process is finished.
If the debugging connecting device is in a receiving state, calling a sending processing function to execute a target debugging command, wherein the process of executing the target debugging command by the sending processing function comprises the following steps:
target data corresponding to the target debug command is obtained, for example: and the state data of the solid state disk to be debugged. And judging whether the debugging connecting device is always performing read operation, and if so, continuously sending the target data to the debugging connecting device. The above process is as shown in fig. 8, before transmitting data, it is determined whether the debug connection device is still in a read operation, and if not, it is ended. If yes, the data is sent and ended.
In this embodiment, the communication state of the debug connection device is determined, if the debug connection device is in the transmission state, the receiving processing function is called to execute the target debug command, otherwise, the transmitting processing function is called to execute the target debug command, so that the firmware can be debugged through the universal idle interface, the universality is achieved, and the development and learning costs can be reduced.
In some alternative embodiments, before step S501 "obtain the target debug command in the first preset protocol format from the debug connection device", the method includes the following steps C1 to C3.
Step C1, acquiring executable codes, wherein the executable codes comprise a receiving processing function and a transmitting processing function;
Step C2, writing executable codes into a solid state disk processor of the solid state disk to be debugged, and enabling the solid state disk processor to be used as a slave of the debugging connection equipment, wherein the solid state disk processor is used for calling a receiving processing function or a sending processing function;
And step C3, controlling the solid state disk processor to enter an operating state.
In this embodiment, according to firmware regulation requirements, an executable code is designed, where the executable code is a code of a running program of a hard disk controller of a solid state hard disk to be debugged, and the running program includes the above I3C slave software, a receiving processing function, and a transmitting processing function. Executable code may be burned into a hard disk controller by a control host, or other burning device, such as an offline burner, etc. The solid state disk processor is used for calling a receiving processing function or a sending processing function.
Specifically, a developer develops a firmware debugging function according to a development plan to obtain an executable code, burns the executable code into an SSD controller, and in the process, the solid state disk to be debugged can acquire the executable code, and writes the executable code into a solid state disk processor of the solid state disk to be debugged, so that the solid state disk processor is used as a slave of a debugging connection device, and the solid state disk processor is controlled to enter an operating state.
Subsequently, the debugging connection device is connected with the solid state disk to be debugged, the control HOST is connected to the debugging connection device, the running code of the processor is imported into HOST software of the control HOST, and a developer starts to debug, configure or read data through the man-machine interface.
Step S502, an execution result of the target debug command and a firmware state of the solid state disk to be debugged are obtained.
Step S503, according to the execution result and the firmware state, generating response data corresponding to the target debug command.
Specifically, after the solid state disk to be debugged executes the target debug command, the execution result of the target debug command and the firmware state of the solid state disk to be debugged are obtained. And generating response data corresponding to the target debugging command according to the execution result and the firmware state. The response data at this time is in a first preset protocol format.
Step S504, the response data is sent to the debugging connection device, the debugging connection device is instructed to forward information contained in the response data to the control host, and the control host is used for positioning firmware problems of the solid state disk to be debugged, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged.
Specifically, the first preset protocol format response data is sent to the debugging connection device, the debugging connection device performs format conversion on the response data to obtain target response data in a second preset protocol format, and the target response data is forwarded to the control host, so that information contained in the response data is forwarded to the control host. If the firmware of the solid state disk to be debugged has problems, the control host machine performs problem positioning according to the target response data.
According to the solid state disk firmware debugging method, the solid state disk to be debugged generates response data, the response data is fed back to the debugging connecting device through the idle interface, and the debugging connecting device forwards information contained in the response data to the control host, so that the control host can conveniently position firmware problems. The idle interface of the solid state disk to be debugged is utilized, the normal operation of the solid state disk to be debugged is not affected in the debugging process, the control computer can acquire corresponding target data in real time, the firmware problem is accurately and efficiently positioned, and the debugging cost is reduced. The problem of inaccurate positioning and low positioning efficiency of firmware problems in the process of debugging the solid state disk firmware is solved.
The embodiment also provides a solid state disk firmware debugging system, which is used for realizing the above embodiment and the preferred implementation manner, and the description is omitted.
The embodiment provides a solid state disk firmware debugging system, which comprises: debugging the connecting equipment and the solid state disk to be debugged;
the debug connection apparatus is used to perform the above steps S201 to S205, S401 to S405, S4041 to S4046, and A1 to A8.
The solid state disk to be debugged is used for executing the steps S501 to S504, the steps B1 to B3 and the steps C1 to C3.
In this embodiment, as shown in fig. 3, the debug system includes a control host ①, a debug connection device ②, and a solid state disk ③ to be debugged, where the control host is a PC or a server, and the control host is connected to a communication interface of the debug connection device. The debugging connecting device comprises a communication interface, a storage module, a controller and a communication module, and the communication module of the debugging connecting device is connected with an I3C interface of the solid state disk to be debugged. The solid state disk to be debugged (namely SSD to be diagnosed) comprises an I3C interface and a PCIe interface, the solid state disk to be debugged is connected with a host containing the PCIe interface through the PCIe interface, the host is a PC or a server, and the solid state disk to be debugged normally operates.
Specifically, the foregoing embodiments of the present invention have been described in detail for each step, and are not described herein.
According to the solid state disk firmware debugging system provided by the embodiment, the debugging connection equipment is connected with the idle interface of the solid state disk to be debugged, and the control host realizes communication with the solid state disk to be debugged through the debugging connection equipment. The solid state disk to be debugged generates response data, the response data is fed back to the debugging connection equipment through the idle interface, and the debugging connection equipment forwards information contained in the response data to the control host, so that the control host can conveniently locate firmware problems. The idle interface of the solid state disk to be debugged is utilized, the normal operation of the solid state disk to be debugged is not affected in the debugging process, the control computer can acquire corresponding target data in real time, the firmware problem is accurately and efficiently positioned, and the debugging cost is reduced. The problem of inaccurate positioning and low positioning efficiency of firmware problems in the process of debugging the solid state disk firmware is solved.
In some alternative embodiments, the control host is connected to a communication interface of the debug connection device; the control host comprises debugging software and a driver; the debugging connection device comprises a controller and a storage module;
The debugging software is used for generating a debugging command and sending the debugging command to the debugging connecting device through a driver, wherein the driver is used for identifying the debugging connecting device;
The controller is used for generating a data acquisition strategy and acquiring response data from the solid state disk to be debugged according to the data acquisition strategy;
the storage module is used for storing the response data.
In this embodiment, as shown in fig. 3, the control HOST ① is a PC or a server, and the control HOST has HOST debug software and a driver, where the HOST debug software is used to read data of a certain address of the solid state disk, read data of a certain register, modify data of a certain address, modify data of a certain register, or execute the above operation driver in batch, which may be considered to be a way for enabling HOST to identify a debug connection device, and needs to be separately designed. Debug connection device ② includes a memory module and a controller.
Specifically, the control host is provided with a driver of the debugging device, the debugging connection device can be identified through the driver, and a debugging command is issued to the solid state disk processor through the driver. The debugging software is used for generating a debugging command and sending the debugging command to the debugging connection device through a driver, wherein the driver is used for identifying the debugging connection device. In addition, HOST debugging software of the system provides a necessary man-machine interface, and the man-machine interface is used for interacting with a man-machine interaction system, so that the running code of the processor can be identified, and data from the SSD controller can be visually displayed, and particularly the running state of the processor at present. And a series of operation interfaces are provided, and a debugger can control the SSD controller through the interfaces, such as configuring parameters of certain data, modifying configuration of certain hardware, and the like. The debug logic of the system is as follows: developing functions; burning the executable code into a solid state disk controller, and enabling the controller to enter an operating state; connecting debugging equipment and equipment to be debugged, connecting HOST software to the debugging equipment, and importing running codes of a processor to the HOST software; and starting debugging, configuring or reading data through the human-computer interface. The problem location logic of the system includes: connecting the debugging equipment with equipment to be debugged, connecting HOST debugging software with the debugging connecting equipment, and importing the running code of a processor into the HOST debugging software, wherein the running code of the processor is a program which is being executed by the solid state disk processor. Starting debugging through a human-computer interface, reading out a specific variable or monitoring the current processor state;
the debugging connection device has certain logic operation capability and storage capability, wherein the logic operation capability is realized by the controller, and the storage capability is realized by the storage module. The controller is used for generating a data acquisition strategy and acquiring response data from the solid state disk to be debugged according to the data acquisition strategy; the storage module is used for storing the response data.
The debugging connection equipment in the system has simple functions, only needs to have USB peripheral equipment and certain storage capacity, and the I3C peripheral equipment can be realized through simulation if not, so that the system has low production cost and can be used in batches. The host software of the system can be used in a cross-platform manner, namely can be used under windows or linux platforms, and meets any development requirements.
In summary, in this embodiment, the firmware is debugged by matching HOST debug software, a driver, a debug connection device, and a hard disk controller.
The embodiment also provides a solid state disk firmware debugging device, which is used for realizing the above embodiment and the preferred implementation manner, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides a solid state disk firmware debugging device, which is deployed in a debugging connection device, as shown in fig. 9, and includes:
the first obtaining module 901 is configured to obtain a debug command from a control host, where the control host is configured to perform firmware debug on a solid state disk to be debugged, and the debug connection device is connected to an idle interface of the solid state disk to be debugged;
the first format conversion module 902 is configured to perform format conversion on the debug command to obtain a target debug command in a first preset protocol format, where the first preset protocol format is a protocol format supported by the idle interface;
The first sending module 903 is configured to send a target debug command to a solid state disk to be debugged;
the second format conversion module 904 is configured to obtain response data corresponding to the target debug command from the solid state disk to be debugged, and perform format conversion on the response data, so as to obtain target response data in a second preset protocol format;
The second sending module 905 is configured to send the target response data to the control host, and instruct the control host to locate the firmware problem according to the target response data when the firmware problem exists in the solid state disk to be debugged.
In some optional embodiments, the second format conversion module 904 obtains response data corresponding to the target debug command from the solid state disk to be debugged, and performs format conversion on the response data to obtain target response data in a second preset protocol format, where the converting includes:
generating a data acquisition strategy;
acquiring response data from the solid state disk to be debugged according to a data acquisition strategy;
Storing the response data;
judging whether the control host and the debugging connection equipment are in a connection state or not;
If the control host is in a connection state with the debugging connection equipment, judging whether the control host is in a receiving state or not;
If the control host is in a receiving state, format conversion is carried out on the response data according to a second preset protocol format, and target response data are obtained.
The embodiment provides a solid state disk firmware debugging device, which is deployed in a debugging connection device, as shown in fig. 10, and includes:
The second obtaining module 1001 is configured to obtain a target debug command in a first preset protocol format from a debug connection device, and execute the target debug command, where the debug connection device is connected to an idle interface of the solid state disk to be debugged, and the first preset protocol format is a protocol format supported by the idle interface;
A third obtaining module 1002, configured to obtain an execution result of the target debug command and a firmware state of the solid state disk to be debugged;
a generating module 1003, configured to generate response data corresponding to the target debug command according to the execution result and the firmware state;
The third sending module 1004 is configured to send the response data to the debug connection device, and instruct the debug connection device to forward information included in the response data to the control host, where the control host is configured to debug the firmware of the solid state disk to be debugged, and the control host locates the firmware problem of the solid state disk to be debugged.
In some alternative embodiments, the second obtaining module 1001 obtains the target debug command in the first preset protocol format from the debug connection device, and executing the target debug command includes:
judging the communication state of the debugging connecting device, wherein the communication state comprises a receiving state and a sending state;
if the debug connection device is in a send state, invoking a receive processing function to execute the target debug command, wherein invoking the receive processing function to execute the target debug command includes:
obtaining a target debug command from a debug connection device;
acquiring a first equipment address of a solid state disk to be debugged;
judging whether the second equipment address designated by the target debugging command is consistent with the first equipment address;
If the second device address is consistent with the first device address, determining a preset debugging command set, and matching the target debugging command with the preset debugging command in the preset debugging command set;
If the matching fails, generating an error code, and returning the error code to the debugging connection equipment;
if the matching is successful, executing the target debugging command;
If the debug connection device is in a receiving state, calling a sending processing function to execute a target debug command, wherein the calling the sending processing function to execute the target debug command comprises:
acquiring target data corresponding to a target debugging command;
Judging whether the debugging connecting device performs the reading operation or not, and if so, sending the target data to the debugging connecting device.
In some alternative embodiments, the apparatus, prior to obtaining the target debug command in the first preset protocol format from the debug connection device, the method further comprises:
acquiring executable codes, wherein the executable codes comprise a receiving processing function and a sending processing function;
Writing executable codes into a solid state disk processor of a solid state disk to be debugged, and enabling the solid state disk processor to be used as a slave of a debugging connection device, wherein the solid state disk processor is used for calling a receiving processing function or a sending processing function;
and controlling the solid state disk processor to enter an operating state.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The firmware debugging device of the solid state disk in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application SPECIFIC INTEGRATED Circuit) Circuit, including a processor and a memory that execute one or more software or fixed programs, and/or other devices that can provide the above functions.
The embodiment of the invention also provides computer equipment, which is provided with the solid state disk firmware debugging device shown in the figure 9 or the figure 10.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 11, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 11.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Portions of the present invention may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or aspects in accordance with the present invention by way of operation of the computer. Those skilled in the art will appreciate that the form of computer program instructions present in a computer readable medium includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the manner in which the computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, a computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by a computer.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.
Claims (11)
1. A method for debugging firmware of a solid state disk, wherein the method is applied to debugging a connection device, and the method comprises the following steps:
Obtaining a debugging command from a control host, wherein the control host is used for carrying out firmware debugging on a solid state disk to be debugged, and the debugging connection equipment is connected with an idle interface of the solid state disk to be debugged;
converting the format of the debug command to obtain a target debug command with a first preset protocol format, wherein the first preset protocol format is a protocol format supported by the idle interface;
the target debugging command is sent to the solid state disk to be debugged;
Obtaining response data corresponding to the target debugging command from the solid state disk to be debugged, and performing format conversion on the response data to obtain target response data in a second preset protocol format;
and sending the target response data to the control host, and indicating the control host to position the firmware problem according to the target response data under the condition that the firmware problem exists in the solid state disk to be debugged.
2. The method of claim 1, wherein the obtaining response data corresponding to the target debug command from the solid state disk to be debugged, and performing format conversion on the response data, converting to obtain target response data in a second preset protocol format, includes:
generating a data acquisition strategy;
acquiring the response data from the solid state disk to be debugged according to the data acquisition strategy;
Storing the response data;
Judging whether the control host and the debugging connection equipment are in a connection state or not;
if the control host is in a connection state with the debugging connection equipment, judging whether the control host is in a receiving state or not;
And if the control host is in a receiving state, performing format conversion on the response data according to the second preset protocol format to obtain the target response data.
3. The solid state disk firmware debugging method is characterized by being applied to a solid state disk to be debugged, and comprises the following steps:
Acquiring a target debugging command in a first preset protocol format from a debugging connection device, and executing the target debugging command, wherein the debugging connection device is connected with an idle interface of the solid state disk to be debugged, and the first preset protocol format is a protocol format supported by the idle interface;
acquiring an execution result of the target debugging command and a firmware state of the solid state disk to be debugged;
Generating response data corresponding to the target debugging command according to the execution result and the firmware state;
And sending the response data to the debugging connection equipment, and indicating the debugging connection equipment to forward information contained in the response data to a control host, and positioning the firmware problem of the solid state disk to be debugged by the control host, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged.
4. A method according to claim 3, wherein the obtaining a target debug command in a first preset protocol format from a debug connection device and executing the target debug command comprises:
Judging the communication state of the debugging connection equipment, wherein the communication state comprises a receiving state and a sending state;
And if the debugging connecting device is in the sending state, calling a receiving processing function to execute the target debugging command, wherein the calling the receiving processing function to execute the target debugging command comprises the following steps:
obtaining a target debug command from the debug connection device;
Acquiring a first equipment address of the solid state disk to be debugged;
Judging whether a second equipment address designated by the target debugging command is consistent with the first equipment address or not;
if the second equipment address is consistent with the first equipment address, determining a preset debugging command set, and matching the target debugging command with preset debugging commands in the preset debugging command set;
if the matching fails, generating an error code, and returning the error code to the debugging connection equipment;
If the matching is successful, executing the target debugging command;
and if the debugging connecting device is in the receiving state, calling a sending processing function to execute the target debugging command, wherein the calling the sending processing function to execute the target debugging command comprises the following steps:
Acquiring target data corresponding to the target debugging command;
judging whether the debugging connecting device performs a read operation or not, and if so, sending the target data to the debugging connecting device.
5. The method of claim 4, wherein prior to the obtaining the target debug command in the first preset protocol format from the debug connection device, the method further comprises:
acquiring executable codes, wherein the executable codes comprise the receiving processing function and the sending processing function;
Writing the executable code into a solid state disk processor of the solid state disk to be debugged, so that the solid state disk processor is used as a slave of the debugging connection equipment, wherein the solid state disk processor is used for calling the receiving processing function or the sending processing function;
and controlling the solid state disk processor to enter an operating state.
6. A solid state disk firmware debugging system, the system comprising: debugging the connecting equipment and the solid state disk to be debugged;
The debugging connection equipment is connected with an idle interface of the solid state disk to be debugged;
The debug connection device is configured to execute the solid state disk firmware debug method of any one of claims 1 to 2;
The solid state disk to be debugged is used for executing the solid state disk firmware debugging method according to any one of claims 3 to 5.
7. The system of claim 6, wherein a control host is coupled to the communication interface of the debug connection apparatus; the control host comprises debugging software and a driver; the debugging connection equipment comprises a controller and a storage module;
The debugging software is used for generating the debugging command and sending the debugging command to the debugging connection device through the driver, wherein the driver is used for identifying the debugging connection device;
the controller is used for generating a data acquisition strategy and acquiring the response data from the solid state disk to be debugged according to the data acquisition strategy;
The storage module is used for storing the response data.
8. A solid state disk firmware debugging device, wherein the device is deployed in a debugging connection apparatus, the device comprising:
the first acquisition module is used for acquiring a debugging command from a control host, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged, and the debugging connection equipment is connected with an idle interface of the solid state disk to be debugged;
the first format conversion module is used for carrying out format conversion on the debug command to obtain a target debug command with a first preset protocol format, wherein the first preset protocol format is a protocol format supported by the idle interface;
the first sending module is used for sending the target debugging command to the solid state disk to be debugged;
The second format conversion module is used for acquiring response data corresponding to the target debugging command from the solid state disk to be debugged, and converting the format of the response data to obtain target response data in a second preset protocol format;
The second sending module is used for sending the target response data to the control host, and indicating the control host to position the firmware problem according to the target response data under the condition that the firmware problem exists in the solid state disk to be debugged.
9. The solid state disk firmware debugging device is characterized by being deployed on a solid state disk to be debugged, and comprises:
The second acquisition module is used for acquiring a target debugging command in a first preset protocol format from the debugging connection equipment and executing the target debugging command, wherein the debugging connection equipment is connected with an idle interface of the solid state disk to be debugged, and the first preset protocol format is a protocol format supported by the idle interface;
The third acquisition module is used for acquiring an execution result of the target debugging command and a firmware state of the solid state disk to be debugged;
The generating module is used for generating response data corresponding to the target debugging command according to the execution result and the firmware state;
The third sending module is used for sending the response data to the debugging connecting device and indicating the debugging connecting device to forward information contained in the response data to a control host, and the control host is used for positioning the firmware problem of the solid state disk to be debugged, wherein the control host is used for carrying out firmware debugging on the solid state disk to be debugged.
10. A computer device, comprising:
The solid state disk firmware debugging method comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the solid state disk firmware debugging method is executed by the processor.
11. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the solid state disk firmware debugging method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410544560.7A CN118409964A (en) | 2024-04-30 | 2024-04-30 | Solid state disk firmware debugging method, system, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410544560.7A CN118409964A (en) | 2024-04-30 | 2024-04-30 | Solid state disk firmware debugging method, system, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118409964A true CN118409964A (en) | 2024-07-30 |
Family
ID=91997149
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410544560.7A Pending CN118409964A (en) | 2024-04-30 | 2024-04-30 | Solid state disk firmware debugging method, system, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118409964A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119576301A (en) * | 2025-01-26 | 2025-03-07 | 山东云海国创云计算装备产业创新中心有限公司 | Processor test system integration method, device, computer equipment and storage medium |
CN119851742A (en) * | 2024-12-30 | 2025-04-18 | 苏州元脑智能科技有限公司 | Solid state disk testing method, device, equipment and medium |
-
2024
- 2024-04-30 CN CN202410544560.7A patent/CN118409964A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119851742A (en) * | 2024-12-30 | 2025-04-18 | 苏州元脑智能科技有限公司 | Solid state disk testing method, device, equipment and medium |
CN119576301A (en) * | 2025-01-26 | 2025-03-07 | 山东云海国创云计算装备产业创新中心有限公司 | Processor test system integration method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112817872B (en) | Development of test systems and methods | |
CN118409964A (en) | Solid state disk firmware debugging method, system, device, computer equipment and storage medium | |
US20190034318A1 (en) | Hardware-Software Co-Verification for Debugging Firmware on a Hardware Simulator | |
CN102346235A (en) | Automatic test system and method for hardware device function | |
US9117018B2 (en) | Method of debugging software and corresponding computer program product | |
CN115562982A (en) | Reference model debugging method and device, electronic equipment and storage medium | |
CN103412817A (en) | Automation testing script offline debugging method and system | |
CN116541032B (en) | Data burning method, device, equipment and computer storage medium | |
CN117112447B (en) | Data transmission method and device, electronic equipment and readable storage medium | |
CN116089281A (en) | Chip testing method, testing platform and device | |
CN113282439B (en) | eMMC test method and device, readable storage medium and electronic equipment | |
CN114676053A (en) | A kind of automatic analysis method and device of hardware equipment | |
CN116107896A (en) | Method, device and storage medium for realizing automatic test based on virtual serial port | |
CN117370093B (en) | Chip debugging method, device, equipment and storage medium | |
CN111427839B (en) | Remote online configuration and debugging method for Intel SoC FPGA | |
CN113986263A (en) | Code automation testing method, device, electronic device, storage medium | |
CN113326670A (en) | Prototype verification system, method, processing unit and equipment | |
CN118708488A (en) | Virtual simulation method, device and equipment based on Autosar architecture | |
CN117234817A (en) | A hard disk backplane decoding method, device, equipment and medium | |
CN113688055B (en) | Single DSP equipment testing arrangement based on DSS | |
CN104678292A (en) | Test method and device for CPLD (Complex Programmable Logic Device) | |
CN115981636A (en) | Chip simulation platform based on automobile software test and construction method | |
CN116301959A (en) | A serial port-based SOC remote program update method and device | |
CN115150431A (en) | Finished vehicle MCU remote debugging system, method and storage medium | |
CN114546746A (en) | Method, device, electronic device and storage medium for chip debugging |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |