Hard disk component startup method, device, electronic device and storage medium
By outputting reset signals to the controller and pins of the hard disk component, the problem of the operating system being unable to start due to abnormal startup of the hard disk component is solved, and the normal startup of the system is achieved.
Patent Information
- Application Number
- CN202111526622.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-12-14
AI Technical Summary
The hard disk component startup abnormally causes the operating system to fail to start normally, resulting in the system being stuck.
When it is detected that the hard disk component is not started normally, the first reset signal is output to its controller to enable it to start normally. If it is still not done, the second reset signal is output to the hard disk component through the target pin to restart, and the target pin is set on the hard disk component.
This increases the probability of successful hard disk booting, avoids system startup stuck, and ensures that the operating system starts normally.
Smart Images

Figure CN114356623B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a hard disk component startup method, device, electronic equipment and storage medium. Background Art
[0002] Currently, in the operating system driver of an electronic device, if the operating system is shut down due to an abnormal power outage or external environmental interference, during the process of restarting the operating system, the hard disk component connected to the electronic device needs to be started so that the operating system can access the read-write system on the hard disk component to ensure the normal startup of the operating system.
[0003] However, in actual situations, the hard disk component often fails to start properly, making it impossible for the operating system to access the read and write system normally, resulting in the operating system being stuck in the startup phase and unable to complete the startup operation. Therefore, a method for starting the hard disk component is urgently needed. Summary of the Invention
[0004] The present invention provides a hard disk component startup method, device, electronic equipment and storage medium, so as to solve the problem that an operating system cannot be normally started due to abnormal startup of the hard disk component.
[0005] In a first aspect, the present invention provides a method for starting a hard disk assembly, which is applied to an electronic device including a hard disk assembly, the method comprising:
[0006] During the process of starting the operating system of the electronic device, when it is detected that the hard disk assembly is not started normally, outputting a first reset signal to the controller of the hard disk assembly to enable the hard disk assembly to start normally;
[0007] If the hard disk assembly still fails to start normally, a second reset signal is output to the hard disk assembly based on a target pin to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly.
[0008] In a second aspect, the present invention provides a hard disk assembly startup device, which is applied to an electronic device including a hard disk assembly, and the device includes:
[0009] a first startup module, configured to output a first reset signal to a controller of the hard disk assembly when detecting that the hard disk assembly has not started normally during the process of starting the operating system of the electronic device, so as to enable the hard disk assembly to start normally;
[0010] The second startup module is used to output a second reset signal to the hard disk assembly based on a target pin if the hard disk assembly still fails to start normally, so as to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly.
[0011] In a third aspect, the present invention provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned hard disk component startup method when executing the program.
[0012] In a fourth aspect, the present invention provides a readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the above-mentioned hard disk component startup method.
[0013] In summary, the hard disk assembly startup method, device, electronic device, and storage medium provided by the embodiments of the present invention will, during the process of starting the operating system of the electronic device, output a first reset signal to the controller of the hard disk assembly when it is detected that the hard disk assembly has not started normally, so that the hard disk assembly can start normally. Then, if the hard disk assembly still does not start normally, a second reset signal is output to the hard disk assembly based on a target pin to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly. The hard disk assembly startup scheme of the embodiments of the present invention can increase the probability of successful hard disk startup during the operating system startup phase by multiple startups, thereby avoiding the problem of system startup stuck due to abnormal hard disk startup, thereby ensuring normal system startup. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0015] Figure 1 It is a flowchart of the steps of an embodiment of a hard disk component startup method of the present invention;
[0016] Figure 2 is a flowchart of steps in another embodiment of a method for starting a hard disk component;
[0017] Figure 3 It is a structural block diagram of an embodiment of a hard disk assembly startup device of the present invention;
[0018] Figure 4 The figure is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0020] Figure 1 This is a flowchart of a method for starting a hard disk component according to an embodiment of the present invention. Figure 1 As shown, the method may include:
[0021] Step 100: During the process of starting the operating system of the electronic device, when it is detected that the hard disk assembly does not start normally, a first reset signal is output to the controller of the hard disk assembly to enable the hard disk assembly to start normally.
[0022] In an embodiment of the present invention, due to the last abnormal power outage of the electronic device or the abnormal shutdown caused by external environmental interference, when the electronic device is restarted, that is, during the restart of the operating system of the electronic device, the operating system needs to access the read-write system on the hard disk assembly to complete the startup, and accessing the read-write system often requires starting the hard disk assembly first. When it is detected that the hard disk assembly has not started normally, the electronic device can output a first reset signal to the controller of the hard disk assembly so that the controller of the hard disk assembly restarts according to the first reset signal, thereby correcting the problem that the controller abnormality causes the hard disk assembly to start abnormally and then fails to start normally. Accordingly, by correcting this problem, the hard disk assembly can be started normally to a certain extent.
[0023] In an embodiment of the present invention, the controller of the hard disk assembly can be a specific circuit chip on an electronic device that controls the hard disk, allocates resources, and regulates data input and output, and is connected to the hard disk assembly via an interface. For example, the controller of the hard disk assembly can be an integrated drive electronics (IDE) or a small computer system interface (SCSI), which is not limited in this embodiment of the present invention. The first reset signal can be a signal sent to the reset interface to enable the hard disk assembly to start normally if the hard disk assembly fails to start normally.
[0024] Optionally, the controller of the hard disk assembly may include a reset interface, which can be used to reset the controller. In an embodiment of the present invention, the reset interface may be an HBA Reset bit on the controller of the hard disk assembly. The controller can be reset by sending a reset signal to the reset interface.
[0025] In an embodiment of the present invention, the step 100 of outputting the first reset signal to the controller of the hard disk assembly so as to enable the hard disk assembly to start normally may include the following sub-steps:
[0026] Sub-step 101: output a first reset signal to the reset interface of the controller to control the controller to perform a reset operation.
[0027] In an embodiment of the present invention, outputting a first reset signal to the reset interface of the controller may be a first-level startup method of the hard disk component, wherein the first reset signal may be a controller reset instruction, and the first reset signal may be sent by the CPU of the electronic device. Specifically, the controller performing a reset operation may be to restore the controller from the current running parameters to the parameters running according to a preset program segment, and the preset program segment may be a pre-set program for the normal operation of the controller. The hard disk component may start abnormally due to a fault in the corresponding hard disk controller, such as abnormal operating parameters or abnormal operating status on the controller, thereby making it impossible for the operating system to normally access the read-write system on the hard disk to complete the startup. Therefore, by outputting a first reset signal to the reset interface of the controller, the controller can be controlled to perform a reset operation, so that the controller is restored to a normal operating state, thereby eliminating the hard disk startup abnormality caused by the controller abnormality, and to a certain extent, ensuring the normal startup of the hard disk.
[0028] Furthermore, in the embodiment of the present invention, after executing the reset operation of the controller, it is also possible to detect whether the hard disk assembly starts normally.
[0029] In an embodiment of the present invention, by performing a reset operation on the controller, the startup anomaly of the controller can be eliminated, and the problem of the hard disk component startup anomaly caused by the controller anomaly can be eliminated. Accordingly, after performing the reset operation, it can be detected whether the hard disk component is started normally at this time. If it is started normally, it can be explained that the failure to start normally this time is caused by the controller anomaly. Accordingly, after performing the reset operation and eliminating the controller anomaly, the hard disk component can be started normally so that the operating system can normally access the read-write system on the hard disk. For example, the hard disk component can be a serial port hard disk (SerialATA, SATA). When a SATA hard disk startup anomaly occurs, the SATA controller can be reset by resetting the HBA Reset bit of the controller, and then the SATA hard disk can be started normally when the failure to start normally this time is caused by the controller anomaly.
[0030] Step 200: If the hard disk assembly still does not start normally, output a second reset signal to the hard disk assembly based on a target pin to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly.
[0031] In an embodiment of the present invention, if the hard disk assembly still fails to start normally after restarting its controller, the electronic device outputs a second reset signal to the hard disk assembly based on a target pin provided on the hard disk assembly to control the entire hard disk assembly to restart, allowing the operating system to access the read / write system on the hard disk assembly, thereby completing the operating system startup. The target pin may be a pin for resetting the hard disk assembly; that is, sending a reset signal to the target pin controls the hard disk assembly to restart. The second reset signal may be a hard disk logic reset signal, used to control the hard disk assembly to restart.
[0032] Optionally, in an embodiment of the present invention, the target pin may be connected to a signal output component, the second reset signal may be a specified type of signal, and outputting the second reset signal to the hard disk component based on the target pin may be a secondary startup method of the hard disk component. Specifically, in step 200, outputting the second reset signal to the hard disk component based on the target pin may include the following sub-steps:
[0033] Sub-step 201: utilizing the signal output component to simulate and generate the designated type of signal.
[0034] In an embodiment of the present invention, the designated type of signal may be a designated level signal. For example, a level signal of a designated duration may be used as the designated type of signal. For example, if the level signal of the designated duration is a low-level signal lasting 100 milliseconds (ms), then the designated type of signal may be simulated and generated by the signal output component. For example, a low-level signal lasting 100 ms may be simulated and generated by the signal output component as the designated type of signal.
[0035] Sub-step 202: output the designated type signal to the target pin.
[0036] In an embodiment of the present invention, a specified type of signal can be transmitted to a target pin, and the target pin is set on the hard disk assembly. Therefore, the hard disk assembly can be restarted according to the specified type of signal. Compared with other paths for transmitting signals, the embodiment of the present invention uses a target pin directly set on the hard disk assembly for signal transmission, which can improve the signal transmission speed to a certain extent, and thus improve the response speed of the device connected to the pin. Therefore, after eliminating the abnormal startup of the hard disk assembly caused by the controller, if the hard disk assembly still cannot start normally, outputting a specified type of signal to the hard disk assembly based on the target pin can improve the efficiency of signal transmission and reduce the time required to restart the hard disk assembly, thereby improving the startup efficiency of the hard disk assembly.
[0037] Optionally, in an embodiment of the present invention, the signal output component can be a general-purpose input / output (GPIO) on an electronic device, the target pin can be a RESET pin on a hard disk component, the target pin can be electrically connected to the signal output component, and the specified type signal can be a valid signal to ensure that the hard disk component performs a restart operation, such as a low-level signal that lasts for 100ms. For example, the GPIO can be set to output mode first, then the GPIO is set to a low-level state, and a delay of 100ms is set. After the delay ends, the GPIO is set to a high-level state, thereby outputting the specified type signal. In an embodiment of the present invention, by utilizing the general-purpose input / output (GPIO) on an electronic device, there is no need to improve the hardware of the electronic device, and the existing resources are used to complete the operation of restarting the hard disk component, thereby reducing the startup cost of the hard disk component. Furthermore, by only outputting the specified type signal, while ensuring that the output signal can effectively control the hard disk component to perform a secondary startup, the problem of wasting resources caused by outputting other signals that cannot effectively control the restart can be avoided.
[0038] In summary, a hard disk assembly startup method provided by an embodiment of the present invention outputs a first reset signal to the controller of the hard disk assembly when detecting that the hard disk assembly has not started normally during the process of starting the operating system of an electronic device, so that the hard disk assembly can start normally. Then, if the hard disk assembly still has not started normally, a second reset signal is output to the hard disk assembly based on a target pin to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly. The hard disk assembly startup method of the embodiment of the present invention can, through multiple startups, to a certain extent improve the probability of successful hard disk startup during the operating system startup phase, thereby avoiding the problem of system startup stuck due to abnormal hard disk startup, thereby ensuring normal system startup.
[0039] Optionally, in an embodiment of the present invention, after the step 200 of outputting a second reset signal to the hard disk assembly based on the target pin so as to control the hard disk assembly to restart according to the second reset signal, the following steps may be performed:
[0040] Step 300: If the hard disk assembly still does not start normally, restart the operating system so as to restart the hard disk assembly during the process of starting the operating system.
[0041] In an embodiment of the present invention, restarting the operating system to restart the hard disk assembly during the operating system startup process can be a three-level startup method for the hard disk assembly. If the hard disk assembly still fails to start normally after the electronic device resets the hard disk assembly controller and resets the hard disk assembly, restarting the operating system of the electronic device can achieve the purpose of restarting the hard disk assembly during the operating system startup process, further increasing the probability of successful startup of the hard disk assembly, allowing the operating system to normally access the hard disk's read and write system to complete system startup.
[0042] Optionally, the step of restarting the operating system in step 300 in the embodiment of the present invention may include the following sub-steps:
[0043] Sub-step 3001: sending a third reset signal to a reset pin of a mainboard in the electronic device to control the operating system to restart.
[0044] In an embodiment of the present invention, the reset pin of the motherboard may specifically be a reset pin of a central processing unit (CPU) provided on the motherboard. Specifically, the CPU may invoke a preset soft reset function to output a third reset signal to the reset pin, thereby controlling the operating system to restart. The third reset signal may be a system restart instruction. In another implementation, the reset pin of the motherboard may also be a power management pin provided on the motherboard. The third reset signal may be input to the power management pin to restart the entire motherboard, thereby restarting the entire operating system. The third reset signal may be a level signal.
[0045] Optionally, the hard disk assembly in the embodiment of the present invention may be configured with a hard disk read / write system; the hard disk assembly startup method in the embodiment of the present invention may further perform the following steps:
[0046] If the hard disk component restarts normally, the hard disk read-write system is accessed through the operating system to complete the startup of the operating system.
[0047] In an embodiment of the present invention, since the electronic device was abnormally shut down during its last operation, during the current startup of the electronic device, the operating system needs to access the read-write system on the hard disk component to complete the startup. Therefore, when the hard disk component restarts normally, the hard disk read-write system can be accessed through the operating system to complete the startup of the operating system.
[0048] For example, Figure 2 is a flowchart of another embodiment of a method for starting a hard disk component. Figure 2 As shown, the hard disk component can be a SATA device. During the startup process of the electronic device, in step 01, the electronic device powers on the SATA device; in step 02, whether the SATA device is accessed to see if there is an abnormality. If an abnormality occurs, step 03 is executed; if no abnormality occurs, step 08 is executed; in step 03, the electronic device resets the controller of the SATA device to enable the SATA device to start normally; in step 04, whether the SATA device is accessed to see if there is an abnormality. If an abnormality occurs, step 05 is executed; if no abnormality occurs, step 08 is executed; in step 05, the electronic device resets the SATA device through GPIO simulating a hardware logic reset signal; in step 06, whether the SATA device is accessed to see if there is an abnormality. If an abnormality occurs, step 07 is executed; if no abnormality occurs, step 08 is executed; in step 07, the electronic device resets the entire hardware and software system through the system, and then executes step 01; in step 08, the electronic device operating system completes startup and enters the system.
[0049] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0050] Figure 3 This is a structural block diagram of an embodiment of a hard disk assembly startup device of the present invention. Figure 3 As shown, the hard disk component startup device 30 is applied to an electronic device including a hard disk component, and may include the following modules:
[0051] The first startup module 301 is configured to output a first reset signal to a controller of the hard disk assembly when detecting that the hard disk assembly has not started normally during the process of starting the operating system of the electronic device, so as to enable the hard disk assembly to start normally;
[0052] The second startup module 302 is used to output a second reset signal to the hard disk assembly based on a target pin if the hard disk assembly still fails to start normally, so as to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly.
[0053] In summary, the hard disk assembly startup device provided by an embodiment of the present invention will, during the process of starting the operating system of an electronic device, output a first reset signal to the controller of the hard disk assembly when it detects that the hard disk assembly has not started normally, so that the hard disk assembly can start normally. Then, if the hard disk assembly still does not start normally, a second reset signal is output to the hard disk assembly based on a target pin to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly. The hard disk assembly startup method of the present invention can, through multiple startups, to a certain extent increase the probability of successful hard disk startup during the operating system startup phase, thereby avoiding the problem of system startup stuck due to hard disk startup abnormality, thereby confirming that the system has started normally.
[0054] Optionally, the controller includes a reset interface, and the reset interface is used to reset the controller;
[0055] The first starting module 301 is further configured to:
[0056] Outputting a first reset signal to the reset interface of the controller to control the controller to perform a reset operation;
[0057] The device 30 further includes: a detection module, configured to detect whether the hard disk assembly starts normally after performing the reset operation.
[0058] Optionally, the target pin is connected to a signal output component, and the second reset signal is a specified type signal;
[0059] The second starting module 302 is further configured to:
[0060] Utilizing the signal output component to simulate and generate the specified type of signal;
[0061] The designated type signal is output to the target pin.
[0062] Optionally, the signal output component is a universal input / output port, and the specified type of signal includes a level signal of a specified duration.
[0063] Optionally, the device 30 further includes:
[0064] The third startup module is used to restart the operating system if the hard disk component has not started normally, so as to restart the hard disk component during the process of starting the operating system.
[0065] Optionally, the third starting module is further configured to:
[0066] A third reset signal is sent to a reset pin of a mainboard in the electronic device to control the operating system to restart.
[0067] Optionally, the hard disk assembly is configured with a hard disk read / write system; the device 30 further includes:
[0068] The access module is used to access the hard disk read-write system through the operating system if the hard disk component restarts normally, so as to complete the startup of the operating system.
[0069] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0070] Figure 4 4 is a block diagram showing a structure of an electronic device 400 according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0071] Reference Figure 4, electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0072] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 402 may include one or more modules to facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
[0073] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0074] The power supply assembly 406 provides power to the various components of the electronic device 400. The power supply assembly 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.
[0075] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0076] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0077] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0078] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the electronic device 400. The sensor assembly 414 can also detect changes in the position of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and temperature changes of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0079] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 414 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 414 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0080] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.
[0081] Preferably, an embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned hard disk component startup method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0082] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the various processes of the aforementioned hard disk component startup method embodiment and achieves the same technical effects. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0083] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0084] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0085] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.
Claims
1. A method for starting a hard disk component, characterized in that: Applied to an electronic device including a hard disk assembly, the method comprises: During the process of starting the operating system of the electronic device, when it is detected that the hard disk assembly has not started normally, a first reset signal is output to the controller of the hard disk assembly to restore the controller from the current operating parameters to the parameters running according to the preset program segment, thereby allowing the hard disk assembly to start normally; If the hard disk assembly still fails to start normally, a second reset signal is output to the hard disk assembly based on a target pin to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly.
2. The method according to claim 1, characterized in that The controller includes a reset interface, and the reset interface is used to reset the controller; Outputting a first reset signal to the controller of the hard disk assembly includes: Outputting a first reset signal to the reset interface of the controller to control the controller to perform a reset operation; The method further comprises: After executing the reset operation, it is detected whether the hard disk assembly starts normally.
3. The method according to claim 1, characterized in that The target pin is connected to the signal output component, and the second reset signal is a specified type signal; The outputting a second reset signal to the hard disk assembly based on the target pin includes: Utilizing the signal output component to simulate and generate the specified type of signal; The designated type signal is output to the target pin.
4. The method according to claim 3, characterized in that The signal output component is a universal input / output port, and the specified type of signal includes a level signal with a specified duration.
5. The method according to claim 1, wherein After outputting a second reset signal to the hard disk assembly based on the target pin to control the hard disk assembly to restart according to the second reset signal, the method further includes: If the hard disk assembly still fails to start normally, the operating system is restarted so as to restart the hard disk assembly during the process of starting the operating system.
6. The method according to claim 5, characterized in that The restarting the operating system includes: A third reset signal is sent to a reset pin of a mainboard in the electronic device to control the operating system to restart.
7. The method according to any one of claims 1 to 6, characterized in that: The hard disk assembly is configured with a hard disk read-write system, and the method further includes: If the hard disk component restarts normally, the hard disk read-write system is accessed through the operating system to complete the startup of the operating system.
8. A hard disk assembly startup device, characterized in that: Applicable to an electronic device including a hard disk assembly, the device comprises: a first startup module configured to, when detecting that the hard disk assembly has not started normally during the process of starting the operating system of the electronic device, output a first reset signal to a controller of the hard disk assembly to restore the controller from current operating parameters to parameters for operating according to a preset program segment, thereby allowing the hard disk assembly to start normally; The second startup module is used to output a second reset signal to the hard disk assembly based on a target pin if the hard disk assembly still fails to start normally, so as to control the hard disk assembly to restart according to the second reset signal, wherein the target pin is set on the hard disk assembly.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the hard disk component startup method according to any one of claims 1 to 7 when executing the program.
10. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the hard disk component startup method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Remote out-of-band SSD monitoring method and device and controlled terminal
CN109032901A
System and method for controlling hard disk soft switching
CN112650376A
Reset method, device and apparatus for single board startup timeout and readable storage medium
CN113641524A