[go: up one dir, main page]

CN107423180A - A kind of solid state hard disc and its diagnostic method - Google Patents

A kind of solid state hard disc and its diagnostic method Download PDF

Info

Publication number
CN107423180A
CN107423180A CN201710630627.9A CN201710630627A CN107423180A CN 107423180 A CN107423180 A CN 107423180A CN 201710630627 A CN201710630627 A CN 201710630627A CN 107423180 A CN107423180 A CN 107423180A
Authority
CN
China
Prior art keywords
interface
solid
chip microcomputer
flash memory
memory controller
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
Application number
CN201710630627.9A
Other languages
Chinese (zh)
Inventor
李鹏
郑志林
郭锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710630627.9A priority Critical patent/CN107423180A/en
Publication of CN107423180A publication Critical patent/CN107423180A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种固态硬盘,包括单片机、具有内部调试端口的闪存控制器以及外部接口,内部调试端口与单片机连接以将闪存控制器的日志信息发送至单片机。由此可见,当固态硬盘的管理接口PICE挂死,甚至于固态硬盘直接挂死时,就可以通过闪存控制器的内部调试端口实时地将闪存控制器的日志信息传递给单片机,主机访问单片机得到日志信息,通过日志信息就可以确定固态硬盘的问题所在,而不像现有技术中需要将固态硬盘取下来,然后寄回给原生产厂家,原生产厂家工程师将此硬盘拆开,利用硬盘内部专用的调试端口确定固态硬盘的问题所在,进而提高了解决问题的时效性。此外,本发明还提供了一种固态硬盘的诊断方法,效果如上。

The invention discloses a solid-state hard disk, which comprises a single-chip microcomputer, a flash memory controller with an internal debugging port and an external interface. The internal debugging port is connected with the single-chip microcomputer to send log information of the flash memory controller to the single-chip microcomputer. It can be seen that when the management interface PICE of the solid-state hard disk hangs, or even the solid-state hard disk hangs directly, the log information of the flash memory controller can be transmitted to the microcontroller in real time through the internal debugging port of the flash memory controller, and the host accesses the microcontroller to get Log information, the problem of the solid-state hard disk can be determined through the log information, unlike the existing technology that needs to remove the solid-state hard disk, and then send it back to the original manufacturer. A dedicated debug port pinpoints solid-state drive issues, improving time-to-resolution. In addition, the present invention also provides a diagnostic method for solid-state hard disks, with the effects as above.

Description

一种固态硬盘及其诊断方法A kind of solid state hard disk and diagnosis method thereof

技术领域technical field

本发明涉及网络应用领域,特别涉及一种固态硬盘及其诊断方法。The invention relates to the field of network applications, in particular to a solid state hard disk and a diagnosis method thereof.

背景技术Background technique

随着互联网的普及,几乎每个人都可以通过互联网访问网站、获取信息,例如通过手机、电脑等。利用互联网整点秒杀抢购限量产品等已经成了大家的噩梦,因此,互联网每天产生的信息量比较大。为了避免大量用户在瞬间访问网站时出现网站瘫痪的现象,相关数据中心会增加配置固态硬盘的服务器数量,网站后台也会配置全闪存阵列。全闪存阵列是完全由固态存储介质构成的独立的存储阵列或设备。随着固态硬盘在数据中心的大量应用,对固态硬盘的维护成了信息技术人员不得不面临的一个问题。With the popularity of the Internet, almost everyone can access websites and obtain information through the Internet, such as through mobile phones and computers. It has become everyone's nightmare to use the Internet to buy limited products in seconds. Therefore, the amount of information generated by the Internet is relatively large every day. In order to avoid website paralysis when a large number of users visit the website in an instant, the relevant data center will increase the number of servers equipped with solid-state drives, and the website background will also be equipped with an all-flash array. An all-flash array is an independent storage array or device that is entirely composed of solid-state storage media. With the massive application of solid-state drives in data centers, the maintenance of solid-state drives has become a problem that information technicians have to face.

请参考图1,图1为现有技术中固态硬盘10内部示意图。如图1所示,固态硬盘10的内部一般包含一个闪存控制器101和一个单片机102,主机可以通过外部接口103与固态硬盘10的PCI-E接口和SMbus接口分别进行数据和管理信息的交互,当固态硬盘10的PCI-E接口挂死,甚至固态硬盘10整个挂死时,一般情况主机是不能通过PCI-E接口与固态硬盘进行信息交互,此时相当于闪存控制器101已经挂死,如果对闪存控制器101进行复位操作,下次能够正常重启,可能不清楚上次异常问题产生的原因;如果重启以后也无法对固态硬盘10进行信息交互,现阶段只能将固态硬盘10从服务器或者全闪存阵列上取下来,然后寄回给原生产厂家,原生产厂家工程师将此硬盘拆开,利用硬盘内部专用的内部调试端口1011进行问题定位。传统的这种对固态硬盘问题定位的方法,耗时耗力,并且解决问题的时效性低。Please refer to FIG. 1 , which is a schematic diagram of the interior of a solid state disk 10 in the prior art. As shown in Figure 1, the interior of solid-state hard disk 10 generally includes a flash memory controller 101 and a single-chip microcomputer 102, and the host computer can carry out the interaction of data and management information with PCI-E interface and SMbus interface of solid-state hard disk 10 respectively through external interface 103, When the PCI-E interface of the solid-state hard disk 10 hangs up, or even the whole solid-state hard disk 10 hangs up, generally the host computer cannot exchange information with the solid-state hard disk through the PCI-E interface, which is equivalent to the flash memory controller 101 being hung up. If the flash memory controller 101 is reset, it can be restarted normally next time, and the cause of the last abnormal problem may not be clear; Or remove it from the all-flash array, and then send it back to the original manufacturer. The original manufacturer's engineer will disassemble the hard disk and use the dedicated internal debugging port 1011 inside the hard disk to locate the problem. This traditional method of locating solid-state disk problems is time-consuming and labor-intensive, and the timeliness of solving problems is low.

由此可见,如何克服对固态硬盘问题定位过程中流程复杂带来的时效性低的问题是本领域技术人员亟待解决的问题。It can be seen that how to overcome the problem of low timeliness caused by the complicated process in the process of locating the problem of the solid state disk is an urgent problem to be solved by those skilled in the art.

发明内容Contents of the invention

本申请实施例提供了一种固态硬盘及其诊断方法,以解决现有技术中解决问题时效性低的问题。Embodiments of the present application provide a solid-state hard disk and a diagnosis method thereof, so as to solve the problem of low timeliness in solving problems in the prior art.

为解决上述技术问题,本发明提供了一种固态硬盘,包括单片机、具有内部调试端口的闪存控制器以及外部接口,所述内部调试端口与所述单片机连接以将所述闪存控制器的日志信息发送至所述单片机。In order to solve the above-mentioned technical problems, the present invention provides a solid-state hard disk, including a single-chip microcomputer, a flash memory controller with an internal debugging port and an external interface, and the internal debugging port is connected with the single-chip microcomputer so that the log information of the flash memory controller sent to the microcontroller.

优选地,所述内部调试端口包括JTAG接口和UART接口。Preferably, the internal debugging port includes a JTAG interface and a UART interface.

优选地,所述单片机通过系统管理总线SMbus接口与所述外部接口连接。Preferably, the single-chip microcomputer is connected to the external interface through a system management bus SMbus interface.

优选地,所述单片机具有两个接口,分别为第一接口和第二接口:所述第一接口,用于获取所述单片机的运行信息;所述第二接口,用于传输所述日志信息。Preferably, the single-chip microcomputer has two interfaces, namely a first interface and a second interface: the first interface is used to obtain the operation information of the single-chip microcomputer; the second interface is used to transmit the log information .

优选地,所述闪存控制器通过所述系统管理总线SMbus接口和PCI-E接口与所述外部接口连接。Preferably, the flash memory controller is connected to the external interface through the system management bus SMbus interface and PCI-E interface.

为解决上述技术问题,本发明还提供了一种固态硬盘的诊断方法,包括:In order to solve the above-mentioned technical problems, the present invention also provides a diagnostic method for a solid-state hard disk, comprising:

预先对所述固态硬盘中的闪存控制器和单片机进行地址定义;Carry out address definition to the flash memory controller and the single-chip microcomputer in the described solid-state hard disk in advance;

访问所述闪存控制器;accessing said flash memory controller;

判断所述访问是否正常,如果否,则访问所述单片机,以获取所述闪存控制器的日志信息;其中,所述单片机通过所述闪存控制器的内部调试端口获取所述日志信息。Judging whether the access is normal, if not, accessing the single-chip microcomputer to obtain the log information of the flash memory controller; wherein, the single-chip microcomputer obtains the log information through the internal debugging port of the flash memory controller.

优选地,所述访问闪存控制器具体通过PCI-E接口访问。Preferably, the access to the flash memory controller is specifically accessed through a PCI-E interface.

优选地,所述访问单片机具体通过系统管理总线SMbus接口访问。Preferably, the accessing single-chip microcomputer specifically accesses through a system management bus SMbus interface.

优选地,所述预先对所述固态硬盘中的闪存控制器和单片机进行地址定义包括:对所述闪存控制器对应的系统管理总线SMbus接口和所述单片机对应的系统管理总线SMbus接口进行地址定义。Preferably, the pre-defining addresses of the flash memory controller and the single-chip microcomputer in the solid-state hard disk include: performing address definition on the system management bus SMbus interface corresponding to the flash memory controller and the system management bus SMbus interface corresponding to the single-chip microcomputer .

优选地,所述访问所述单片机,以获取所述闪存控制器的日志信息具体为:通过所述单片机的第二接口访问所述单片机,以获取所述闪存控制器的日志信息;其中,所述单片机具有第一接口和第二接口,所述第一接口,用于获取所述单片机的运行信息;所述第二接口,用于传输所述日志信息。Preferably, the accessing the single-chip microcomputer to obtain the log information of the flash memory controller specifically includes: accessing the single-chip microcomputer through the second interface of the single-chip microcomputer to obtain the log information of the flash memory controller; wherein, the The single-chip microcomputer has a first interface and a second interface, the first interface is used to obtain the operation information of the single-chip microcomputer; the second interface is used to transmit the log information.

相对于现有技术,本发明所提供的固态硬盘及其诊断方法,固态硬盘中的闪存控制器的内部调试端口与固态硬盘中的单片机连接。由此可见,当固态硬盘的管理接口PICE挂死,甚至于固态硬盘直接挂死时,就可以通过闪存控制器的内部调试端口实时地将闪存控制器的日志信息传递给单片机,主机访问单片机得到日志信息,通过日志信息就可以确定固态硬盘的问题所在,而不像现有技术中需要将固态硬盘从服务器或者全闪存阵列上取下来,然后寄回给原生产厂家,原生产厂家工程师将此硬盘拆开,利用硬盘内部专用的调试端口确定固态硬盘的问题所在,进而提高了解决问题的时效性。Compared with the prior art, in the solid-state hard disk and its diagnosis method provided by the present invention, the internal debugging port of the flash memory controller in the solid-state hard disk is connected with the single-chip microcomputer in the solid-state hard disk. It can be seen that when the management interface PICE of the solid-state hard disk hangs, or even the solid-state hard disk hangs directly, the log information of the flash controller can be transmitted to the microcontroller in real time through the internal debugging port of the flash controller, and the host accesses the microcontroller to get Log information, the problem of the solid-state drive can be determined through the log information, unlike the prior art that requires the solid-state drive to be removed from the server or the all-flash array, and then sent back to the original manufacturer, the original manufacturer’s engineer will The hard disk is disassembled, and the dedicated debugging port inside the hard disk is used to determine the problem of the solid-state hard disk, thereby improving the timeliness of solving the problem.

附图说明Description of drawings

图1为现有技术中非易失性存储器标准固态硬盘内部示意图;FIG. 1 is an internal schematic diagram of a non-volatile memory standard solid-state hard disk in the prior art;

图2为本发明实施例所提供的一种固态硬盘内部示意图;Fig. 2 is a schematic diagram of the interior of a solid-state hard disk provided by an embodiment of the present invention;

图3为本发明实施例提供的一种固态硬盘的诊断方法流程图。FIG. 3 is a flowchart of a diagnostic method for a solid state disk provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明的核心是提供一种固态硬盘及其诊断方法,可以提高解决问题的时效性。The core of the invention is to provide a solid-state hard disk and its diagnosis method, which can improve the timeliness of solving problems.

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

图2为本发明实施例所提供的一种固态硬盘内部示意图,如图2所示,本发明实施例提供的一种固态硬盘10包括单片机102、具有内部调试端口的闪存控制器101以及外部接口103,内部调试端口1011与单片机102连接以将闪存控制器101的日志信息发送至单片机102。Figure 2 is a schematic diagram of the interior of a solid-state hard disk provided by an embodiment of the present invention. As shown in Figure 2, a solid-state hard disk 10 provided by an embodiment of the present invention includes a single-chip microcomputer 102, a flash memory controller 101 with an internal debugging port, and an external interface 103 , the internal debugging port 1011 is connected to the single-chip microcomputer 102 to send the log information of the flash memory controller 101 to the single-chip microcomputer 102 .

固态硬盘10在使用过程中有时会挂死,即固态硬盘10内部的闪存控制器101挂死,因为固态硬盘10内部的闪存控制器101上的内部调试端口1011与固态硬盘10内部的单片机102连接,单片机102可以利用内部调试端口1011收集闪存控制器101的有关信息,例如日志信息,这时主机就可以通过固态硬盘10内部的单片机102得到闪存控制器的101的日志信息,实现对固态硬盘10的问题诊断。日志信息可以是内部控制器101的健康信息,也可以是内部控制器101挂死之前产生的问题信息,可以理解的是日志信息包括多种,在此不再赘述。外部接口103可以是符合要求的接口,具体选取哪种接口可以根据实际情况而定,在本申请实施例中外部接口可以选取标准定义接口SFF-8639,当然,外部接口103的选取并不影响本申请实施例的实现。The solid-state hard disk 10 sometimes hangs up during use, that is, the flash memory controller 101 inside the solid-state hard disk 10 hangs up, because the internal debugging port 1011 on the flash memory controller 101 inside the solid-state hard disk 10 is connected to the single-chip microcomputer 102 inside the solid-state hard disk 10 , the single-chip microcomputer 102 can use the internal debugging port 1011 to collect relevant information of the flash memory controller 101, such as log information, and at this time, the host computer can obtain the log information of the flash memory controller 101 through the single-chip microcomputer 102 inside the solid-state hard disk 10, and implement the solid-state hard disk 10 problem diagnosis. The log information may be the health information of the internal controller 101, or the problem information generated before the internal controller 101 hangs up. It can be understood that there are many types of log information, which will not be repeated here. The external interface 103 can be an interface that meets the requirements. Which interface to choose can be determined according to the actual situation. In the embodiment of the present application, the external interface can choose the standard definition interface SFF-8639. Of course, the selection of the external interface 103 does not affect this application. The implementation of the application embodiment.

本实施例所提供的固态硬盘,当固态硬盘直接挂死时,就可以通过闪存控制器的内部调试端口实时地将闪存控制器的日志信息传递给单片机,主机可以通过访问单片机得到日志信息,利用日志信息确定固态硬盘的问题所在,而不再需要将固态硬盘单独取下来,然后寄回给原生产厂家,提高了对固态硬盘的可维护性,节省了部分时间,进而提高了解决问题的时效性。The solid-state hard disk provided by this embodiment, when the solid-state hard disk directly hangs up, can transmit the log information of the flash memory controller to the single-chip microcomputer in real time through the internal debugging port of the flash memory controller, and the host can obtain the log information by accessing the single-chip microcomputer, and use The log information determines the problem of the solid-state drive, and no longer needs to remove the solid-state drive separately, and then send it back to the original manufacturer, which improves the maintainability of the solid-state drive, saves some time, and improves the timeliness of problem solving sex.

在上述实施例的基础上,作为优选地实施方式,内部调试端口包括JTAG接口和UART接口。On the basis of the above embodiments, as a preferred implementation manner, the internal debugging port includes a JTAG interface and a UART interface.

JTAG是一种标准的通讯口,即一种专用的串行通讯口,可以用来传输闪存控制器101的日志信息,实现闪存控制器101与单片机102之间的信息传输。UART是一种通用异步传输收发器,可以实现全双工传输和接收。全双工是指可以同时进行信号的双向传输,例如,信号可以同时在A到B之间进行双向传输,即A到B、B到A的信息同时进行,也可以将并行数据转换成串行数据,在信息传输时,可以产生额外的指示发送和接收的信号,本实施例所提供的固态硬盘采用JTAG接口和UART接口传输信息效率高。可以理解的是,除了上述两种接口类型外,还可以是其它类型的接口,本实施例不再赘述。JTAG is a standard communication port, that is, a dedicated serial communication port, which can be used to transmit log information of the flash memory controller 101 to realize information transmission between the flash memory controller 101 and the single-chip microcomputer 102 . UART is a Universal Asynchronous Transfer Transceiver, which can realize full-duplex transmission and reception. Full-duplex means that the two-way transmission of signals can be carried out at the same time. For example, the signal can be transmitted in both directions between A and B at the same time, that is, the information from A to B and B to A is carried out at the same time, and parallel data can also be converted into serial For data, when information is transmitted, additional signals indicating sending and receiving can be generated. The solid-state hard disk provided in this embodiment adopts JTAG interface and UART interface to transmit information with high efficiency. It can be understood that, in addition to the above two types of interfaces, other types of interfaces may also be used, which will not be described in detail in this embodiment.

在上述实施例的基础上,作为优选地实施方式,单片机102通过系统管理总线SMbus接口与外部接口103连接。On the basis of the above embodiments, as a preferred implementation manner, the single chip microcomputer 102 is connected to the external interface 103 through a system management bus SMbus interface.

单片机102和外部接口103上都有对应的SMbus接口(系统管理总线),本实施例所提供的固态硬盘采用SMbus接口不需要增加额外引脚,数据传输效率高。There are corresponding SMbus interfaces (system management bus) on the single-chip microcomputer 102 and the external interface 103. The solid-state hard disk provided by this embodiment adopts the SMbus interface without adding additional pins, and the data transmission efficiency is high.

在上述实施例的基础上,作为优选地实施方式,单片机102具有两个接口,分别为第一接口和第二接口:第一接口,用于获取单片机102的运行信息;第二接口,用于传输日志信息。On the basis of the above-mentioned embodiments, as a preferred implementation mode, the single-chip microcomputer 102 has two interfaces, which are respectively a first interface and a second interface: the first interface is used to obtain the operation information of the single-chip microcomputer 102; the second interface is used to Transfer log information.

单片机102上有两个SMbus接口,第一接口直接获取单片机102运行时产生的信息,例如,若固态硬盘10应用于互联网,且用户利用互联网抢购限量产品时,单片机102运行时产生的信息就有可能是相关产品的关键信息,也有可能是相关网络的健康信息,可以理解的是,除了这两种信息之外,还可以是其它有关信息,在此不再赘述。第二接口可以传输闪存控制器101的日志信息,即可以通过第二SMbus接口对固态硬盘10进行实时在线诊断。本实施例所提供的固态硬盘实现了SMbus接口的多种功能,提高了固态硬盘出现故障时在线诊断的可行性。第一接口和第二接口是人们根据习惯规定的,并不是固定的,可以根据个人喜好改变,接口的命名方式并不会影响本申请实施例的实现。There are two SMbus interfaces on the single-chip microcomputer 102, and the first interface directly obtains the information generated when the single-chip microcomputer 102 runs. It may be the key information of the relevant product, or it may be the health information of the relevant network. It is understandable that in addition to these two kinds of information, it may also be other relevant information, which will not be repeated here. The second interface can transmit the log information of the flash memory controller 101, that is, real-time online diagnosis can be performed on the solid-state hard disk 10 through the second SMbus interface. The solid-state hard disk provided in this embodiment realizes various functions of the SMbus interface, and improves the feasibility of online diagnosis when the solid-state hard disk fails. The first interface and the second interface are defined according to people's habits and are not fixed. They can be changed according to personal preferences. The naming method of the interfaces will not affect the implementation of the embodiment of the present application.

在上述实施例的基础上,作为优选地实施方式,闪存控制器101通过SMbus接口和PCI-E接口与外部接口103连接。On the basis of the above embodiments, as a preferred implementation manner, the flash memory controller 101 is connected to the external interface 103 through an SMbus interface and a PCI-E interface.

当固态硬盘10正常时,主机可以通过PCI-E接口链路直接与固态硬盘10中的闪存控制器101进行信息交互,即主机可以直接得到闪存控制器101的日志信息,本实施例所提供的固态硬盘数据传输过程简单。When the solid-state hard disk 10 is normal, the host can directly interact with the flash memory controller 101 in the solid-state hard disk 10 through the PCI-E interface link, that is, the host can directly obtain the log information of the flash memory controller 101. The data transfer process of SSD is simple.

上文中对于固态硬盘的实施例进行了详细描述,本发明实施例还提供了一种与该固态硬盘对应的诊断方法。由于诊断方法部分的实施例与固态硬盘部分的实施例相互对应,因此诊断方法部分的实施例请参照固态硬盘部分的实施例描述,在此不再详细赘述。The embodiment of the solid state disk is described in detail above, and the embodiment of the present invention also provides a diagnosis method corresponding to the solid state disk. Since the embodiments of the diagnosis method part correspond to the embodiments of the solid-state hard disk part, please refer to the description of the embodiments of the solid-state hard disk part for the embodiments of the diagnosis method part, and details will not be repeated here.

图3为本发明实施例提供的一种固态硬盘的诊断方法流程图,如图3所示,包括以下步骤:Fig. 3 is a flow chart of a diagnostic method for a solid-state hard disk provided by an embodiment of the present invention, as shown in Fig. 3 , including the following steps:

步骤S301:预先对固态硬盘中的闪存控制器和单片机进行地址定义。Step S301: pre-defining the addresses of the flash memory controller and the single-chip microcomputer in the solid state disk.

为了防止闪存控制器和单片机模块之间的地址发生冲突,需要提前对其进行地址定义。In order to prevent address conflicts between the flash memory controller and the microcontroller module, it is necessary to define its address in advance.

步骤S302:访问闪存控制器。Step S302: Access the flash memory controller.

在正常情况下,主机与固态硬盘进行信息交互是通过访问固态硬盘中的闪存控制器,并且是通过PCI-E接口直接对固态硬盘中的闪存控制器进行访问,实现主机与固态硬盘的信息交互。当然也可以采用其它符合要求的接口协议对闪存控制器进行访问,采用PCI-E接口只是一种优选地方式,并不代表只有这一种。Under normal circumstances, the information exchange between the host and the solid-state hard disk is through accessing the flash memory controller in the solid-state hard disk, and directly accessing the flash memory controller in the solid-state hard disk through the PCI-E interface to realize the information interaction between the host and the solid-state hard disk . Of course, other interface protocols that meet the requirements can also be used to access the flash memory controller. Using the PCI-E interface is only a preferred method, and does not mean that it is the only one.

步骤S303:判断访问是否正常,如果否,则进入步骤S304。Step S303: judge whether the access is normal, if not, go to step S304.

步骤S304:访问单片机,以获取闪存控制器的日志信息。Step S304: accessing the single-chip microcomputer to obtain the log information of the flash memory controller.

主机首先通过PCI-E接口链路访问闪存控制器,进而与固态硬盘进行信息交互,若该连接超时并且进行多次尝试后仍然显示失败,就说明PCI-E接口链路出现问题或者闪存控制器挂死了,即访问不正常。若通过PCI-E接口链路无法访问时,主机就会通过SMbus接口对固态硬盘中的单片机进行访问,而单片机可以通过闪存控制器的内部调试端口获取闪存控制器的日志信息,所以最终主机可以获取闪存控制器的日志信息。The host first accesses the flash memory controller through the PCI-E interface link, and then exchanges information with the solid-state drive. If the connection times out and fails after several attempts, it means that there is a problem with the PCI-E interface link or the flash memory controller. It hangs up, that is, the visit is not normal. If the link cannot be accessed through the PCI-E interface, the host will access the single-chip microcomputer in the solid-state hard disk through the SMbus interface, and the single-chip microcomputer can obtain the log information of the flash memory controller through the internal debugging port of the flash memory controller, so the final host can Get log information for the flash controller.

相关工作人员会对获取到的日志信息进行分析,若根据该日志信息能确定固态硬盘挂死的问题所在并且能够保证重启固态硬盘后不会造成数据丢失时,就对固态硬盘进行复位重启。若根据该日志信息不能确定固态硬盘的问题所在,主机就通过SMbus接口给单片机下发相关指令,单片机进行协议转换后通过闪存控制器的内部调试端口对内部控制器下发对应指令,再次获取闪存控制器的日志信息,直到找到固态硬盘问题根源为止。主机对单片机下发的指令可能只适用于单片机,并不适用于闪存控制器,所以单片机要对主机下发的相关指令进行协议转换。Relevant staff will analyze the obtained log information, and if the problem of the solid-state hard disk hanging can be determined according to the log information and the solid-state hard disk can be restarted without data loss, the solid-state hard disk will be reset and restarted. If the problem of the solid-state hard disk cannot be determined according to the log information, the host will send relevant instructions to the microcontroller through the SMbus interface. log information from the controller until the source of the SSD problem is found. The instructions issued by the host to the MCU may only be applicable to the MCU, but not to the flash memory controller, so the MCU needs to perform protocol conversion on the relevant instructions issued by the host.

本实施例提供的固态硬盘诊断方法,预先对固态硬盘中的闪存控制器和单片机进行地址定义;然后访问闪存控制器;最后判断访问是否正常,如果否,则访问单片机,以获取闪存控制器的日志信息;其中,单片机通过闪存控制器的内部调试端口获取日志信息。由此可见,当固态硬盘的PICE接口挂死,甚至于固态硬盘直接挂死时,就可以通过闪存控制器的内部调试端口实时地将闪存控制器的日志信息传递给单片机,主机访问单片机得到日志信息,通过日志信息就可以确定固态硬盘的问题所在,而不像现有技术中需要将固态硬盘从服务器或者全闪存阵列上取下来,然后寄回给原生产厂家,原生产厂家工程师将此硬盘拆开,利用硬盘内部专用的调试端口确定固态硬盘的问题所在,进而提高了解决问题的时效性。The solid-state hard disk diagnosis method provided by the present embodiment defines the address of the flash memory controller and the single-chip microcomputer in the solid-state hard disk in advance; Log information; Among them, the single-chip microcomputer obtains the log information through the internal debugging port of the flash memory controller. It can be seen that when the PICE interface of the solid-state hard disk hangs, or even the solid-state hard disk hangs directly, the log information of the flash memory controller can be transmitted to the MCU in real time through the internal debugging port of the flash memory controller, and the host can access the MCU to get the log information. Information, the problem of the solid-state hard disk can be determined through the log information, unlike the existing technology that needs to remove the solid-state hard disk from the server or the all-flash array, and then send it back to the original manufacturer. Disassemble, and use the special debugging port inside the hard disk to determine the problem of the solid-state hard disk, thereby improving the timeliness of solving the problem.

在上述实施例的基础上,作为优选地实施方式,预先对固态硬盘中的闪存控制器和单片机进行地址定义包括:对闪存控制器对应的系统管理总线SMbus接口和单片机对应的系统管理总线SMbus接口进行地址定义。On the basis of the above-described embodiments, as a preferred embodiment, pre-defining the addresses of the flash memory controller and the single-chip microcomputer in the solid-state hard disk includes: the system management bus SMbus interface corresponding to the flash memory controller and the system management bus SMbus interface corresponding to the single-chip microcomputer Perform address definition.

对闪存控制器和单片机对应的SMbus接口进行地址定义,为了防止各个接口的地址发生冲突。Define the address of the SMbus interface corresponding to the flash memory controller and the microcontroller, in order to prevent conflicts between the addresses of each interface.

在上述实施例的基础上,作为优选地实施方式,访问单片机,以获取闪存控制器的日志信息具体为:通过单片机的第二接口访问单片机,以获取闪存控制器的日志信息;其中,单片机具有第一接口和第二接口,第一接口,用于获取单片机的运行信息;第二接口,用于传输日志信息。On the basis of the foregoing embodiments, as a preferred implementation manner, accessing the single-chip microcomputer to obtain the log information of the flash memory controller is specifically: accessing the single-chip microcomputer through the second interface of the single-chip microcomputer to obtain the log information of the flash memory controller; wherein the single-chip microcomputer has The first interface and the second interface, the first interface is used to obtain the operation information of the single-chip microcomputer; the second interface is used to transmit log information.

第一接口和第二接口是与上文对应的SMbus接口,在单片机上设有两个SMbus接口,用以实现不同的功能。第一接口、第二接口是根据习惯人为规定的,并不是固定不变的,当然,接口的命名方式并不会影响本申请实施例的实现。The first interface and the second interface are SMbus interfaces corresponding to the above, and two SMbus interfaces are provided on the single-chip microcomputer to realize different functions. The first interface and the second interface are artificially defined according to custom and are not fixed. Of course, the naming method of the interface will not affect the realization of the embodiment of the present application.

以上对本发明所提供的固态硬盘及其诊断方法进行了详细介绍。本文中运用几个实例对本发明的原理及实施方式进行了阐述,以上实施例的说明,只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制,本领域技术人员,在没有创造性劳动的前提下,对本发明所做出的修改、等同替换、改进等,均应包含在本申请中。The solid state hard disk provided by the present invention and the diagnosis method thereof are introduced in detail above. In this paper, several examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; meanwhile, for those of ordinary skill in the art, according to the present invention There will be changes in the specific implementation and scope of application. In summary, the content of this specification should not be understood as a limitation of the present invention. The modifications, equivalent replacements, improvements, etc. made shall be included in this application.

Claims (10)

1.一种固态硬盘,其特征在于,包括单片机、具有内部调试端口的闪存控制器以及外部接口,所述内部调试端口与所述单片机连接以将所述闪存控制器的日志信息发送至所述单片机。1. a solid-state hard disk, is characterized in that, comprises single-chip microcomputer, has the flash memory controller and the external interface of internal debug port, and described internal debug port is connected with described single-chip microcomputer so that the log information of described flash memory controller is sent to described microcontroller. 2.根据权利要求1所述的固态硬盘,其特征在于,所述内部调试端口包括JTAG接口和UART接口。2. The solid state disk according to claim 1, wherein the internal debugging port comprises a JTAG interface and a UART interface. 3.根据权利要求1所述的固态硬盘,其特征在于,所述单片机通过系统管理总线SMbus接口与所述外部接口连接。3. The solid-state hard disk according to claim 1, wherein the single-chip microcomputer is connected to the external interface through a system management bus SMbus interface. 4.根据权利要求1-3任意一项所述的固态硬盘,其特征在于,所述单片机具有两个接口,分别为第一接口和第二接口:4. The solid-state hard disk according to any one of claims 1-3, wherein the single-chip microcomputer has two interfaces, which are respectively a first interface and a second interface: 所述第一接口,用于获取所述单片机的运行信息;The first interface is used to obtain the operation information of the single-chip microcomputer; 所述第二接口,用于传输所述日志信息。The second interface is used to transmit the log information. 5.根据权利要求1所述的固态硬盘,其特征在于,所述闪存控制器通过所述系统管理总线SMbus接口和PCI-E接口与所述外部接口连接。5. The solid state disk according to claim 1, wherein the flash memory controller is connected to the external interface through the system management bus SMbus interface and the PCI-E interface. 6.一种固态硬盘的诊断方法,基于权利要求1-5任意一项所述的固态硬盘,其特征在于,包括:6. A diagnostic method for a solid-state hard disk, based on the solid-state hard disk according to any one of claims 1-5, characterized in that, comprising: 预先对所述固态硬盘中的闪存控制器和单片机进行地址定义;Carry out address definition to the flash memory controller and the single-chip microcomputer in the described solid-state hard disk in advance; 访问所述闪存控制器;accessing said flash memory controller; 判断所述访问是否正常,如果否,则访问所述单片机,以获取所述闪存控制器的日志信息;Judging whether the access is normal, if not, accessing the single-chip microcomputer to obtain the log information of the flash memory controller; 其中,所述单片机通过所述闪存控制器的内部调试端口获取所述日志信息。Wherein, the single-chip microcomputer obtains the log information through an internal debugging port of the flash memory controller. 7.根据权利要求6所述的方法,其特征在于,所述访问闪存控制器具体通过PCI-E接口访问。7. The method according to claim 6, wherein the access to the flash memory controller is specifically accessed through a PCI-E interface. 8.根据权利要求6所述的方法,其特征在于,所述访问单片机具体通过系统管理总线SMbus接口访问。8. The method according to claim 6, wherein the accessing single-chip microcomputer is specifically accessed through a system management bus SMbus interface. 9.根据权利要求8所述的方法,其特征在于,所述预先对所述固态硬盘中的闪存控制器和单片机进行地址定义包括:对所述闪存控制器对应的系统管理总线SMbus接口和所述单片机对应的系统管理总线SMbus接口进行地址定义。9. The method according to claim 8, characterized in that, defining addresses of the flash memory controller and the single-chip microcomputer in the solid-state hard disk in advance comprises: defining the system management bus SMbus interface and the corresponding system management bus SMbus interface of the flash memory controller Define the address of the system management bus SMbus interface corresponding to the single-chip microcomputer. 10.根据权利要求6所述的方法,其特征在于,所述访问所述单片机,以获取所述闪存控制器的日志信息具体为:10. The method according to claim 6, wherein the accessing the single-chip microcomputer to obtain the log information of the flash memory controller is specifically: 通过所述单片机的第二接口访问所述单片机,以获取所述闪存控制器的日志信息;Accessing the single-chip microcomputer through the second interface of the single-chip microcomputer to obtain log information of the flash memory controller; 其中,所述单片机具有第一接口和第二接口,所述第一接口,用于获取所述单片机的运行信息;所述第二接口,用于传输所述日志信息。Wherein, the single-chip microcomputer has a first interface and a second interface, the first interface is used to obtain the operation information of the single-chip microcomputer; the second interface is used to transmit the log information.
CN201710630627.9A 2017-07-28 2017-07-28 A kind of solid state hard disc and its diagnostic method Pending CN107423180A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710630627.9A CN107423180A (en) 2017-07-28 2017-07-28 A kind of solid state hard disc and its diagnostic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710630627.9A CN107423180A (en) 2017-07-28 2017-07-28 A kind of solid state hard disc and its diagnostic method

Publications (1)

Publication Number Publication Date
CN107423180A true CN107423180A (en) 2017-12-01

Family

ID=60430682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710630627.9A Pending CN107423180A (en) 2017-07-28 2017-07-28 A kind of solid state hard disc and its diagnostic method

Country Status (1)

Country Link
CN (1) CN107423180A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108737154A (en) * 2018-04-03 2018-11-02 郑州云海信息技术有限公司 It is a kind of to dodge communication means and system in array system entirely
CN109003646A (en) * 2018-07-24 2018-12-14 浪潮电子信息产业股份有限公司 Data processing method and single chip microcomputer
CN109032863A (en) * 2018-07-19 2018-12-18 郑州云海信息技术有限公司 Determination method, the system of a kind of NVMe solid state hard disk and its failure cause
CN109032897A (en) * 2018-08-01 2018-12-18 浪潮电子信息产业股份有限公司 Data scheduling method, host and solid state disk
CN109062753A (en) * 2018-06-01 2018-12-21 新华三技术有限公司成都分公司 A kind of hard disk monitoring system and monitoring method
CN109117297A (en) * 2018-08-30 2019-01-01 浪潮电子信息产业股份有限公司 Fault positioning method and device for solid state disk
CN109240870A (en) * 2018-09-25 2019-01-18 浪潮电子信息产业股份有限公司 Solid state disk fault positioning method and related device
CN112346660A (en) * 2020-11-13 2021-02-09 北京泽石科技有限公司 Data storage method and device and data reading method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681944A (en) * 2010-12-22 2012-09-19 三星电子株式会社 Data storage device and related method of operation
US20160070486A1 (en) * 2014-09-04 2016-03-10 HGST Netherlands B.V. Debug data saving in host memory on pcie solid state drive
US20160358669A1 (en) * 2015-06-04 2016-12-08 Samsung Electronics Co., Ltd. Storage device, main board in which the storage device is embedded, and self-diagnosis method thereof
US20170004063A1 (en) * 2015-06-30 2017-01-05 Freescale Semiconductor, Inc. Flash memory controller, data processing system with flash memory controller and method of operating a flash memory controller
CN106875977A (en) * 2017-02-27 2017-06-20 郑州云海信息技术有限公司 A kind of solid state hard disc adjustment method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681944A (en) * 2010-12-22 2012-09-19 三星电子株式会社 Data storage device and related method of operation
US20160070486A1 (en) * 2014-09-04 2016-03-10 HGST Netherlands B.V. Debug data saving in host memory on pcie solid state drive
US20160358669A1 (en) * 2015-06-04 2016-12-08 Samsung Electronics Co., Ltd. Storage device, main board in which the storage device is embedded, and self-diagnosis method thereof
US20170004063A1 (en) * 2015-06-30 2017-01-05 Freescale Semiconductor, Inc. Flash memory controller, data processing system with flash memory controller and method of operating a flash memory controller
CN106875977A (en) * 2017-02-27 2017-06-20 郑州云海信息技术有限公司 A kind of solid state hard disc adjustment method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龙小奇: "基于SATA接口的固态硬盘控制器设计", 《中国优秀硕士学位论文全文数据库》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108737154A (en) * 2018-04-03 2018-11-02 郑州云海信息技术有限公司 It is a kind of to dodge communication means and system in array system entirely
CN109062753A (en) * 2018-06-01 2018-12-21 新华三技术有限公司成都分公司 A kind of hard disk monitoring system and monitoring method
CN109032863A (en) * 2018-07-19 2018-12-18 郑州云海信息技术有限公司 Determination method, the system of a kind of NVMe solid state hard disk and its failure cause
CN109003646A (en) * 2018-07-24 2018-12-14 浪潮电子信息产业股份有限公司 Data processing method and single chip microcomputer
CN109032897A (en) * 2018-08-01 2018-12-18 浪潮电子信息产业股份有限公司 Data scheduling method, host and solid state disk
CN109117297A (en) * 2018-08-30 2019-01-01 浪潮电子信息产业股份有限公司 Fault positioning method and device for solid state disk
CN109240870A (en) * 2018-09-25 2019-01-18 浪潮电子信息产业股份有限公司 Solid state disk fault positioning method and related device
CN112346660A (en) * 2020-11-13 2021-02-09 北京泽石科技有限公司 Data storage method and device and data reading method and device
CN112346660B (en) * 2020-11-13 2024-05-14 北京泽石科技有限公司 Data storage method and device, and data reading method and device

Similar Documents

Publication Publication Date Title
JP6871957B2 (en) Emulated endpoint configuration
CN107423180A (en) A kind of solid state hard disc and its diagnostic method
US10282192B1 (en) Updating device code through a bus
US10241951B1 (en) Device full memory access through standard PCI express bus
CN103902427B (en) A kind of method with outer acquisition disk state
CN102609215B (en) Data processing method and device
WO2014004021A2 (en) Tunneling platform management messages through inter-processor interconnects
CN114003445B (en) BMC I2C monitoring function test method, system, terminal and storage medium
WO2013075501A1 (en) Method and device for hot-plugging a node
CN116126613A (en) A method, device, electronic device, and storage medium for detecting the position of a PCIe device
CN116860391A (en) GPU computing power resource scheduling method, device, equipment and medium
CN116627861A (en) Data processing method and system based on expander, electronic equipment and storage medium
CN103885900B (en) Data access processing method, PCIe device and user equipment
CN111104359B (en) Access method and device for baseboard management controller
CN116701175A (en) GDS system read and write performance test method, device and electronic equipment of server
CN116089124A (en) Communication method, device and medium of simulation system
CN103440218A (en) CAN (Control Area Network) bus monitoring method based on USB-HID (Universal Serial Bus-Human Input Device) protocol
TW202020707A (en) Systems and methods for management of software connections
CN110109858A (en) Bus architecture, server, internal storage data reading/writing method and readable storage medium storing program for executing
CN117319255A (en) Method, device, medium and terminal for testing network card out-of-band management function
CN118656280A (en) A consistency verification method and related device
WO2018086101A1 (en) Method for determining hotspot address, and device using same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20171201

RJ01 Rejection of invention patent application after publication