Bootrom error injection test method for ssd hard disk
Patent Information
- Application Number
- CN202311087844.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-08-28
AI Technical Summary
[0003]SSD硬盘的bootrom注错测试,首先需要准备大量用于注错的固件,这些固件在注错范围、注错类型、加密方式等处多有不同,都需要一一手动生成;另外,注错验证时,需要手动调整拨码开关状态、手动执行固件下载流程、反复对SSD盘上下电,整体测试流程繁琐、容易出错
[0009] The beneficial effects of this invention are as follows: This invention utilizes software to automatically generate firmware for error injection, avoiding oversights caused by manually compiling error-injecting firmware; the software controls the power-on of the SSD disk instead of directly powering off the host, reducing the time consumed in each round of testing; the software automatically checks the serial port output, reducing the number of times test results need to be manually checked, and significantly improving testing efficiency.
Smart Images

Figure CN117133346B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of SSD hard drive testing, specifically a method for testing SSD hard drive bootrom injection errors. Background Technology
[0002] The Bootrom is the most crucial program segment in an SSD controller chip. This program, stored in ROM, is responsible for updating the bootloader firmware (FBL). This program cannot be modified after tape-out; therefore, defects in the Bootrom can render the chip unusable. To ensure chip reliability, the Bootrom logic is typically kept as simple as possible, only needing to fulfill the requirements for FBL updates and booting. Bootrom error injection testing involves generating numerous FBL firmware files with various errors, loading them into the Bootrom, and checking whether the FBL firmware can boot normally or print corresponding error messages.
[0003] Testing the bootrom for SSDs requires preparing a large number of firmware files for error injection. These firmware files vary in terms of the scope, type, and encryption method of error injection, and each one needs to be generated manually. In addition, during error injection verification, it is necessary to manually adjust the DIP switch status, manually execute the firmware download process, and repeatedly power on and off the SSD. The overall testing process is cumbersome and prone to errors. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a method for testing bootrom errors in SSD hard drives, which uses an automated method to perform bootrom error testing and improves testing efficiency.
[0005] To solve the aforementioned problem, the technical solution adopted by the present invention is: a method for testing bootrom errors in SSD hard drives, comprising the following steps: S01) A hardware adapter is set up, which includes an SSD interface, an SSD hard disk mounting slot, a serial port module, a power control module, and a boot mode control module. The SSD interface is used to connect to a host with an SSD interface. The SSD hard disk mounting slot is used to install an SSD hard disk. The power control module is connected to the SSD hard disk mounting slot and is used to power on and off the SSD hard disk. The boot mode control module is connected to the host via a data cable and is used to switch the bootrom boot mode. The serial port module is connected to the host via a data cable and enables bidirectional communication between the host and the SSD hard disk. S02) Prepare a host with an SSD interface and the SSD to be tested. Connect the hardware adapter to the SSD interface of the host, insert the SSD to be tested into the SSD installation slot, and connect the data cable from the hard drive adapter to the host. S03) Run the control software on the host. First, select the error injection parameters. The error injection parameters include the error injection range to be covered by the error injection test, the error injection type and the encryption method. The control software automatically generates all the error injection firmware and, according to the pre-specified rules, specifies the error message that appears in the serial port when the hard drive starts after each type of error injection firmware is downloaded to the SSD hard drive. S04) Start the test. The test process is as follows: S41) The control software modifies the boot mode and controls the power-on of the SSD to make it enter a certain boot mode; S42) The control software executes the firmware download program to download the prepared error-corrected firmware into the bootrom; S43) After the download is complete, power off the SSD. S44) The control software modifies the boot mode, controls the power-on of the SSD hard drive to enter the normal boot mode, and checks whether the serial port outputs the expected error message. S45) If the output meets expectations, power down the SSD and return to step S41) to start the next test. If the output does not meet expectations, the test ends.
[0006] Furthermore, the firmware generation process for error correction is as follows: A) Select the error injection parameters to be tested in the command window of the control software, including the error injection range, error injection type, and encryption method; B) The control software first generates a correct encrypted FBL firmware according to the selected encryption method; C) Then, according to the selected error injection range and type, combined with the custom error injection rules and restrictions, first read the content of the address corresponding to the correct encrypted FBL firmware, and then replace it with the error content to generate the FBL firmware used for error injection.
[0007] Furthermore, the names of the erroneous firmware and the erroneous parameters used are recorded in a small database. At the same time, according to the preset correspondence, the error messages that each erroneous firmware will print on the serial port during normal boot are recorded as a reference for the test program.
[0008] Furthermore, the power control module integrates a custom driver into the server's BMC platform, enabling the SSD hard drive to power on and off via IPMI commands.
[0009] The beneficial effects of this invention are as follows: This invention utilizes software to automatically generate firmware for error injection, avoiding oversights caused by manually compiling error-injecting firmware; the software controls the power-on of the SSD disk instead of directly powering off the host, reducing the time consumed in each round of testing; the software automatically checks the serial port output, reducing the number of times test results need to be manually checked, and significantly improving testing efficiency. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the hardware adapter. Figure 2 This is a flowchart of the test method described in Example 1. Detailed Implementation
[0011] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0012] Example 1 This embodiment discloses a method for testing bootrom errors in SSD hard drives. This method includes two parts: a hardware adapter and control software. First, the hardware adapter is configured, such as... Figure 1 As shown, the hardware adapter includes an SSD interface, an SSD hard drive mounting slot, a serial port module, a power control module, and a boot mode control module. The SSD interface is used to connect to a host with an SSD interface. The SSD hard drive mounting slot is used to install an SSD hard drive. The power control module is connected to the SSD hard drive mounting slot to control the power on and off of the SSD hard drive. The boot mode control module is connected to the host via a data cable to switch the bootrom boot mode. The serial port module is connected to the host via a data cable to enable bidirectional communication between the host and the SSD hard drive.
[0013] In this embodiment, the power control module integrates a custom driver into the server's BMC platform, enabling simple SSD power-on / off functionality via IPMI commands. The boot control module connects to the host via a data cable, replacing the manual DIP switch to switch boot ROM boot modes.
[0014] After setting up the hardware adapter, prepare a host with an SSD interface and the SSD to be tested. Connect the hardware adapter to the SSD interface of the host, insert the SSD to be tested into the SSD installation slot, and connect the data cable from the adapter to the host.
[0015] Then, the control software is run on the host. First, select the error injection parameters, namely the error injection range to be covered by the error injection test, the error injection type, the encryption method, etc. The software automatically generates all the error-injected firmware and, according to the pre-defined rules, specifies the error message that appears in the serial port when the SSD disk boots after each type of error-injected firmware is downloaded to the SSD disk.
[0016] Begin testing, executing tests sequentially according to a predefined test order. For example... Figure 2 As shown, the specific test procedure is as follows: (1) Modify the boot mode of the software to control the power-on of the SSD and make it enter a certain boot mode; (2) The software executes the firmware download program to download the prepared error-corrected firmware to the bootrom; (3) After the download is complete, power off the SSD. (4) Modify the startup mode of the software, control the power-on of the SSD hard disk to make it enter the normal boot mode, and at the same time check whether the serial port outputs the expected error message; (5) If the output meets expectations, power off the SSD and return to step (1) to start the next test. If the output does not meet expectations, the test ends.
[0017] Specifically, the principle behind generating error-annotated firmware is as follows: FBL firmware has a fixed format, and its content includes firmware identifier, version number, key, encryption format, firmware image, etc. The starting address and length of each part are fixed or follow a pattern. By modifying a certain part of the content, the corresponding error-annotated firmware can be generated.
[0018] The firmware generation process for corrected errors is as follows: (1) On the command window of the control software, you can select the error injection parameters to be tested, including error injection range, error injection type, encryption method, etc.; (2) The control software first generates a correct encrypted FBL firmware according to the selected encryption method; (3) Then, according to the selected error injection range and type, combined with the custom error injection rules and restrictions, first read the content of the address corresponding to the correct encrypted FBL firmware, and then replace it with the error content to generate the FBL firmware used for error injection.
[0019] These firmware names and the error injection parameters they use will be recorded in a small database. At the same time, according to the preset correspondence, the error information that each firmware will print on the serial port during normal boot will be recorded as a reference for the test program.
[0020] This invention utilizes control software to automatically generate firmware for error injection, avoiding oversights caused by manually compiling error-injecting firmware; the software controls the power-on of the SSD disk instead of directly powering off the host, reducing the time consumed in each round of testing; the software automatically checks the serial port output, reducing the number of times test results need to be manually checked, significantly improving testing efficiency.
[0021] The above description only illustrates the basic principles and preferred embodiments of the present invention. Any improvements and substitutions made by those skilled in the art based on the present invention are within the scope of protection of the present invention.
Claims
1. A method for testing bootrom errors in an SSD hard drive, characterized in that: Includes the following steps: S01) A hardware adapter is set up, which includes an SSD interface, an SSD hard disk mounting slot, a serial port module, a power control module, and a boot mode control module. The SSD interface is used to connect to a host with an SSD interface. The SSD hard disk mounting slot is used to install an SSD hard disk. The power control module is connected to the SSD hard disk mounting slot and is used to power on and off the SSD hard disk. The boot mode control module is connected to the host via a data cable and is used to switch the bootrom boot mode. The serial port module is connected to the host via a data cable and enables bidirectional communication between the host and the SSD hard disk. S02) Prepare a host with an SSD interface and the SSD to be tested. Connect the hardware adapter to the SSD interface of the host, insert the SSD to be tested into the SSD installation slot, and connect the data cable from the hard drive adapter to the host. S03) Run the control software on the host. First, select the error injection parameters. The error injection parameters include the error injection range to be covered by the error injection test, the error injection type and the encryption method. The control software automatically generates all the error injection firmware and, according to the pre-specified rules, specifies the error message that appears in the serial port when the hard drive starts after each type of error injection firmware is downloaded to the SSD hard drive. S04) Start the test. The test process is as follows: S41) The control software modifies the boot mode and controls the power-on of the SSD to make it enter a certain boot mode; S42) The control software executes the firmware download program to download the prepared error-corrected firmware into the bootrom; S43) After the download is complete, power off the SSD. S44) The control software modifies the boot mode, controls the power-on of the SSD hard drive to enter the normal boot mode, and checks whether the serial port outputs the expected error message. S45) If the output meets expectations, power down the SSD and return to step S41) to start the next test. If the output does not meet expectations, the test ends.
2. The bootrom error testing method for SSD hard drives according to claim 1, characterized in that: The firmware generation process for corrected errors is as follows: A) Select the error injection parameters to be tested in the command window of the control software, including the error injection range, error injection type, and encryption method; B) The control software first generates a correct encrypted FBL firmware according to the selected encryption method; C) Then, according to the selected error injection range and type, combined with the custom error injection rules and restrictions, first read the content of the address corresponding to the correct encrypted FBL firmware, and then replace it with the error content to generate the FBL firmware used for error injection.
3. The bootrom error testing method for SSD hard drives according to claim 1, characterized in that: The names of the firmware entries and the error entry parameters used are recorded in a small database. At the same time, according to the preset correspondence, the error messages that each firmware entry will print on the serial port during normal boot are recorded as a reference for the test program.
4. The bootrom error testing method for SSD hard drives according to claim 1, characterized in that: The power control module integrates a custom driver into the server's BMC platform, enabling SSD power-on and power-off functionality via IPMI commands.
Citation Information
Patent Citations
Method and device for improving SSD test efficiency, computer equipment and storage medium
CN110209520A
Solid-State Disk Manufacturing Self Test
US20130124932A1