CN113127281A - ASPM test method, system, equipment and medium - Google Patents

ASPM test method, system, equipment and medium Download PDF

Info

Publication number
CN113127281A
CN113127281A CN202110415121.2A CN202110415121A CN113127281A CN 113127281 A CN113127281 A CN 113127281A CN 202110415121 A CN202110415121 A CN 202110415121A CN 113127281 A CN113127281 A CN 113127281A
Authority
CN
China
Prior art keywords
register
value
tested
identification number
acquiring
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.)
Granted
Application number
CN202110415121.2A
Other languages
Chinese (zh)
Other versions
CN113127281B (en
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.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer 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 Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110415121.2A priority Critical patent/CN113127281B/en
Publication of CN113127281A publication Critical patent/CN113127281A/en
Application granted granted Critical
Publication of CN113127281B publication Critical patent/CN113127281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F11/221Detection 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 to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • 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
    • G06F11/2221Detection 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 to test input/output devices or peripheral units
    • 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/2273Test methods
    • 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/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • G06F11/2635Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers using a storage for the test inputs, e.g. test ROM, script files

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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses an ASPM testing method, which comprises the following steps: acquiring an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested; acquiring a value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and acquiring a value of a second register corresponding to the root port according to the identification number of the root port; judging whether the value of the first register is not less than the value of the second register; and confirming that the test is passed in response to the value of the first register not being less than the value of the second register. The invention also discloses a system, a computer device and a readable storage medium. According to the scheme provided by the invention, the relation between the L1 exit time of the root port and the L1 exit time of the device to be tested is positioned by checking the register, so that the test accuracy is ensured, and the test time is greatly saved.

Description

ASPM test method, system, equipment and medium
Technical Field
The invention relates to the field of testing, in particular to an ASPM testing method, system, equipment and storage medium.
Background
Many PCIE devices in the server, such as a network card, a video card, and NVME, support the ASPM function. Currently, on the Whitley platform, two modes of ASPM are supported: l0s, L1. Wherein L0s is the link standby mode, and L1 is the low power consumption standby mode. Because there are many PCIE devices, when performing an ASPM test of a PCIE Device, generally, under Linux, by running an lspci-s xxx-vvv command (xxx represents the BDF number of the PCIE Device), and then checking the ASPM related information under LnkCap and Device LnkCtl of the Device to be tested in the output content, it is determined whether the setting is in effect.
However, the conventional test method has the following problems:
1. the Linux OS is provided with power management, so that the ASPM function of the PCIE equipment is influenced to a certain extent, and the checked result has the possibility of inaccuracy;
2. every time when the PCIE equipment is replaced, the BDF number of the equipment needs to be retrieved again, then the lspci-s BDF vvv command is executed, functions supported by each PCIE equipment are different, the number of lines is large when ASPM information is searched, and the position of a wrong line is easy to search. For different PCIE devices, verification is performed, and there are many devices to be tested. Especially when setting as Per-Port, it is necessary to set ASPM for a single PCIE Port separately, the testing procedure is very complicated, and errors are easily made by a manual search method.
3. The test is not comprehensive. The exit time of the L1 of the root port and the device to be tested is not considered, when the exit time of the L1 of the root port is larger than the exit time of the L1 of the device to be tested, although the device to be tested can return to the L0 state before the buffer is filled, the root port cannot return to the L0 state, information cannot be transmitted, the buffer is accumulated continuously, and the problem is generated.
Therefore, an accurate and fast ASPM testing method is urgently needed at present.
Disclosure of Invention
In view of the above, in order to overcome at least one aspect of the above problems, an embodiment of the present invention provides an ASPM testing method, including the following steps:
acquiring an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested;
acquiring a value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and acquiring a value of a second register corresponding to the root port according to the identification number of the root port;
judging whether the value of the first register is not less than the value of the second register;
and confirming that the test is passed in response to the value of the first register not being less than the value of the second register.
In some embodiments, further comprising:
acquiring a value of a third register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the equipment to be tested supports ASPM according to the value of the third register;
and responding to the condition that the to-be-tested equipment does not support the ASPM management, ending the test and outputting a corresponding result.
In some embodiments, further comprising:
and restarting after setting the EFI Shell as a first starting item and setting the ASPM option as a first preset value on a setup interface.
In some embodiments, further comprising:
acquiring a value of a fourth register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the value of the fourth register is a first preset value or not;
and responding to the condition that the value of the fourth register is not the first preset value, ending the test and outputting a corresponding result.
In some embodiments, obtaining an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested further includes:
and respectively acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested according to a preset command.
In some embodiments, further comprising:
acquiring the value of a corresponding bit according to the address of the first register;
acquiring the value of a corresponding bit according to the address of the second register;
acquiring the value of a corresponding bit according to the address of the third register;
and acquiring the value of the corresponding bit according to the address of the fourth register.
In some embodiments, further comprising:
and acquiring and operating the test file.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides an ASPM test system, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested;
the second acquisition module is configured to acquire a value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and acquire a value of a second register corresponding to the root port according to the identification number of the root port;
the judging module is configured to judge whether the value of the first register is not smaller than the value of the second register;
a response module configured to confirm that the test passed in response to the value of the first register being not less than the value of the second register.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer apparatus, including:
at least one processor; and
a memory storing a computer program operable on the processor, wherein the processor executes the program to perform any of the steps of the ASPM testing method described above.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of any of the ASPM testing methods described above.
The invention has one of the following beneficial technical effects: the scheme provided by the invention realizes the test of the PCIE ASPM function under the shell, and increases the searching ability and the data reading accuracy by checking the comparison register value. And by editing the automatic script script.sh, the automatic test of the ASPM function of all PCIE devices is realized, thereby not only ensuring the test accuracy, but also saving the test time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flow chart of an ASPM testing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an ASPM test system according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer device provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
It should be noted that, in the embodiment of the present invention, uefi (unified Extensible Firmware interface) refers to a unified Extensible Firmware interface; pcie (peripheral component interconnect express) refers to a high-speed serial computer expansion bus standard; ASPM (active State Power management) refers to active State Power management; BDF (bus number, device number, function number) means a bus number, a device number, a function number; lnkcap (link capability) refers to the highest bandwidth that the system can provide; LnkCtl (Link control) refers to bandwidth control; PCH (platform Controller hub) refers to an integrated south bridge.
According to an aspect of the present invention, an embodiment of the present invention provides an ASPM testing method, as shown in fig. 1, which may include the steps of:
s1, acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested;
s2, obtaining the value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and obtaining the value of a second register corresponding to the root port according to the identification number of the root port;
s3, judging whether the value of the first register is not less than the value of the second register;
s4, responding to the first register value not less than the second register value, confirming that the test is passed.
The scheme provided by the invention positions the relation between the L1 exit time of a Root Port (Root Port) and the L1 exit time of the device to be tested by checking the register, thereby not only ensuring the accuracy of the test, but also greatly saving the test time.
In some embodiments, step S1, acquiring an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested, further includes:
and respectively acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested according to a preset command.
Specifically, the BDF number (bus number, device number, function number) of the PCIE device and the BDF number (bus number, device number, function number) of the root port (rootport) corresponding thereto may be detected through the pci-b command.
In some embodiments, in step S2, in the obtaining of the value of the first register corresponding to the device to be tested according to the identification number of the device to be tested and the obtaining of the value of the second register corresponding to the root port according to the identification number of the root port, specifically, the value of the first register corresponding to the device to be tested may be obtained according to the identification number of the device to be tested by executing pci device _ rootport-i-b, and the value of the second register corresponding to the root port may be obtained according to the identification number of the root port by executing pci device _ rootport-i-b.
It should be noted that the first register is a register that records the exit time of L1 of the device to be tested; the second register is a register that records the L1 exit time of the corresponding root port.
Therefore, after the values of the first register and the second register are obtained, whether the ASPM test of the device to be tested passes or not can be judged by comparing the values of the first register and the second register. That is, when the L1 exit time of the Root Port (Root Port) is not greater than the L1 exit time of the device under test, it means that both the Root Port (Root Port) and the device under test can return to the L0 state before the buffer is full, so the ASPM can be set successfully and the test is finished. When the exit time of the L1 of the Root Port (Root Port) is longer than the exit time of the L1 of the dut, although the dut can fall back to the L0 state before the buffer is full, the Root Port (Root Port) cannot fall back to the L0 state, which results in the information being unable to be transferred, the buffer continues to accumulate, and the problem occurs, at this time, the L1 exit time of the Root Port (Root Port) is directly output because it is longer than the L1 exit time of the dut, and the test is ended.
In some embodiments, further comprising:
acquiring a value of a third register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the equipment to be tested supports ASPM according to the value of the third register;
and responding to the condition that the to-be-tested equipment does not support the ASPM management, ending the test and outputting a corresponding result.
Specifically, the value of the third register represents the ASPM information of LnkCap (Link capability, which refers to the highest bandwidth that the system can provide) of the Device to be tested, i.e., Device Capabilities, which represents the capability of the Device itself, and indicates whether the PCIE Device to be tested supports the ASPM function and which ASPM modes are supported. Therefore, the values of the first register and the second register can be continuously compared by judging whether the value of the third register, namely the ASPM Support supports L1 or not; if not, outputting that the PCIE device to be tested does not support L1, and ending the test.
It should be noted that, if it is determined that the PCIE device to be tested supports the ASPM before the test is performed, the value of the first register and the value of the second register are directly determined, otherwise, the value of the third register is determined.
In some embodiments, further comprising:
and restarting after setting the EFI Shell as a first starting item and setting the ASPM option as a first preset value on a setup interface.
Specifically, a setup interface may be entered by DEL during the Post phase of the system, and then EFI Shell is set as the first start item, and PCIE ASPM option is set as L1 only. Finally, the settings are saved and the system is restarted, as per F10.
In some embodiments, further comprising:
acquiring a value of a fourth register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the value of the fourth register is a first preset value or not;
and responding to the condition that the value of the fourth register is not the first preset value, ending the test and outputting a corresponding result.
Specifically, the value of the fourth register represents the ASPM information under lnkctl (ASPM control) of the Device under test, i.e., the ASPM options/modes that the user can set, which is constrained by the Device LnkCap. For example, if the ASPM option is set to L1 only in advance on the setup interface, the value of the fourth register corresponds to L1 only. Thus, in performing the test, it may be determined whether the ASPM option was successfully set to L1 only by retrieving the value of the fourth register. For example, by determining whether the value of the fourth register is the first preset value (e.g., whether the value is 10), if the value is 10, the setting is successful, the subsequent test is continued (e.g., the test of the relationship between the L1 exit time of the Root Port (Root Port) and the L1 exit time of the device to be tested is performed), and if the value is not 10, the test is ended, and a corresponding result is output.
In some embodiments, when performing an ASPM test on a device under test, the value of the third register may be determined first, then the value of the fourth register may be determined, and finally the value of the first register and the value of the second register may be compared; the value judgment of the fourth register can be carried out firstly, and then the value of the first register is compared with the value of the second register; the value of the third register can be judged first, and then the value of the first register is compared with the value of the second register; it is also possible to only make a comparison of the value of the first register and the value of the second register.
In some embodiments, further comprising:
acquiring the value of a corresponding bit according to the address of the first register;
acquiring the value of a corresponding bit according to the address of the second register;
acquiring the value of a corresponding bit according to the address of the third register;
and acquiring the value of the corresponding bit according to the address of the fourth register.
Specifically, the addresses of the first register, the second register, the third register and the fourth register are all different. In some embodiments, the bits in the first register representing the value of the exit time of L1 of the dut may be [11:9], the bits in the second register representing the value of the exit time of L1 of the root port may be [17:15], the bits in the third register representing the value of the ASPM information of LnkCap of the dut may be [11:10], and the bits in the fourth register representing the value of the ASPM information under lnkctl (ASPM control) of the dut may be [1:0 ].
In some embodiments, further comprising:
and acquiring and operating the test file.
In particular, the relevant test command (for example, BDF number fetch command, command to fetch register value) may be written into startup. Sh is then run automatically under EFI Shell and the result is output into the result. Therefore, the EFI Shell is set as the first starting item in advance, the system can automatically enter the EFI Shell and automatically run the startup.
The scheme provided by the invention realizes the test of the PCIE ASPM function under the shell, and increases the searching ability and the data reading accuracy by checking the comparison register value. And by editing the automatic script script.sh, the automatic test of the ASPM function of all PCIE devices is realized, thereby not only ensuring the test accuracy, but also saving the test time.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides an ASPM test system 400, as shown in fig. 2, including:
a first obtaining module 401 configured to obtain an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested;
a second obtaining module 402, configured to obtain, according to the identification number of the device to be tested, a value of a first register corresponding to the device to be tested, and obtain, according to the identification number of the root port, a value of a second register corresponding to the root port;
a judging module 403 configured to judge whether the value of the first register is not less than the value of the second register;
a response module 404 configured to confirm that the test passed in response to the value of the first register being not less than the value of the second register.
The scheme provided by the invention positions the relation between the L1 exit time of a Root Port (Root Port) and the L1 exit time of the device to be tested by checking the register, thereby not only ensuring the accuracy of the test, but also greatly saving the test time.
In some embodiments, the first obtaining module 401 is further configured to:
and respectively acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested according to a preset command.
Specifically, the BDF number (bus number, device number, function number) of the PCIE device and the BDF number (bus number, device number, function number) of the root port (rootport) corresponding thereto may be detected through the pci-b command.
In some embodiments, the second obtaining module 402 is further configured to obtain, by executing the pci device _ rootport-i-b, a value of a first register corresponding to the device to be tested according to the identification number of the device to be tested, and obtain, according to the identification number of the root port, a value of a second register corresponding to the root port according to the pci BDF _ rootport-i-b.
It should be noted that the first register is a register that records the exit time of L1 of the device to be tested; the second register is a register that records the L1 exit time of the corresponding root port.
Therefore, after the values of the first register and the second register are obtained, whether the ASPM test of the device to be tested passes or not can be judged by comparing the values of the first register and the second register. That is, when the L1 exit time of the Root Port (Root Port) is not greater than the L1 exit time of the device under test, it means that both the Root Port (Root Port) and the device under test can return to the L0 state before the buffer is full, so the ASPM can be set successfully and the test is finished. When the exit time of the L1 of the Root Port (Root Port) is longer than the exit time of the L1 of the dut, although the dut can fall back to the L0 state before the buffer is full, the Root Port (Root Port) cannot fall back to the L0 state, which results in the information being unable to be transferred, the buffer continues to accumulate, and the problem occurs, at this time, the L1 exit time of the Root Port (Root Port) is directly output because it is longer than the L1 exit time of the dut, and the test is ended.
In some embodiments, the system further comprises a third obtaining module configured to:
acquiring a value of a third register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the equipment to be tested supports ASPM according to the value of the third register;
and responding to the condition that the to-be-tested equipment does not support the ASPM management, ending the test and outputting a corresponding result.
Specifically, the value of the third register represents the ASPM information of LnkCap (Link capability, which refers to the highest bandwidth that the system can provide) of the Device to be tested, i.e., Device Capabilities, which represents the capability of the Device itself, and indicates whether the PCIE Device to be tested supports the ASPM function and which ASPM modes are supported. Therefore, the values of the first register and the second register can be continuously compared by judging whether the value of the third register, namely the ASPM Support supports L1 or not; if not, outputting that the PCIE device to be tested does not support L1, and ending the test.
It should be noted that, if it is determined that the PCIE device to be tested supports the ASPM before the test is performed, the value of the first register and the value of the second register are directly determined, otherwise, the value of the third register is determined.
In some embodiments, the system further comprises a setting module configured to:
and restarting after setting the EFI Shell as a first starting item and setting the ASPM option as a first preset value on a setup interface.
Specifically, a setup interface may be entered by DEL during the Post phase of the system, and then EFI Shell is set as the first start item, and PCIE ASPM option is set as L1 only. Finally, the settings are saved and the system is restarted, as per F10.
In some embodiments, the system further comprises a fourth obtaining module configured to:
acquiring a value of a fourth register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the value of the fourth register is a first preset value or not;
and responding to the condition that the value of the fourth register is not the first preset value, ending the test and outputting a corresponding result.
Specifically, the value of the fourth register represents the ASPM information under lnkctl (ASPM control) of the Device under test, i.e., the ASPM options/modes that the user can set, which is constrained by the Device LnkCap. For example, if the ASPM option is set to L1 only in advance on the setup interface, the value of the fourth register corresponds to L1 only. Thus, in performing the test, it may be determined whether the ASPM option was successfully set to L1 only by retrieving the value of the fourth register. For example, by determining whether the value of the fourth register is the first preset value (e.g., whether the value is 10), if the value is 10, the setting is successful, the subsequent test is continued (e.g., the test of the relationship between the L1 exit time of the Root Port (Root Port) and the L1 exit time of the device to be tested is performed), and if the value is not 10, the test is ended, and a corresponding result is output.
In some embodiments, when performing an ASPM test on a device under test, the value of the third register may be determined first, then the value of the fourth register may be determined, and finally the value of the first register and the value of the second register may be compared; the value judgment of the fourth register can be carried out firstly, and then the value of the first register is compared with the value of the second register; the value of the third register can be judged first, and then the value of the first register is compared with the value of the second register; it is also possible to only make a comparison of the value of the first register and the value of the second register.
In some embodiments, the system further comprises a fifth obtaining module configured to:
acquiring the value of a corresponding bit according to the address of the first register;
acquiring the value of a corresponding bit according to the address of the second register;
acquiring the value of a corresponding bit according to the address of the third register;
and acquiring the value of the corresponding bit according to the address of the fourth register.
Specifically, the addresses of the first register, the second register, the third register and the fourth register are all different. In some embodiments, the bits in the first register representing the value of the exit time of L1 of the dut may be [11:9], the bits in the second register representing the value of the exit time of L1 of the root port may be [17:15], the bits in the third register representing the value of the ASPM information of LnkCap of the dut may be [11:10], and the bits in the fourth register representing the value of the ASPM information under lnkctl (ASPM control) of the dut may be [1:0 ].
In some embodiments, the system further comprises a sixth obtaining module configured to:
and acquiring and operating the test file.
In particular, the relevant test command (for example, BDF number fetch command, command to fetch register value) may be written into startup. Sh is then run automatically under EFI Shell and the result is output into the result. Therefore, the EFI Shell is set as the first starting item in advance, the system can automatically enter the EFI Shell and automatically run the startup.
The scheme provided by the invention realizes the test of the PCIE ASPM function under the shell, and increases the searching ability and the data reading accuracy by checking the comparison register value. And by editing the automatic script script.sh, the automatic test of the ASPM function of all PCIE devices is realized, thereby not only ensuring the test accuracy, but also saving the test time.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, an embodiment of the present invention further provides a computer apparatus 501, comprising:
at least one processor 520; and
a memory 510, the memory 510 storing a computer program 511 executable on the processor, the processor 520 executing the program to perform the steps of: s1, acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested; s2, obtaining the value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and obtaining the value of a second register corresponding to the root port according to the identification number of the root port; s3, judging whether the value of the first register is not less than the value of the second register; s4, responding to the first register value not less than the second register value, confirming that the test is passed.
In some embodiments, further comprising:
acquiring a value of a third register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the equipment to be tested supports ASPM according to the value of the third register;
and responding to the condition that the to-be-tested equipment does not support the ASPM management, ending the test and outputting a corresponding result.
In some embodiments, further comprising:
and restarting after setting the EFI Shell as a first starting item and setting the ASPM option as a first preset value on a setup interface.
In some embodiments, further comprising:
acquiring a value of a fourth register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the value of the fourth register is a first preset value or not;
and responding to the condition that the value of the fourth register is not the first preset value, ending the test and outputting a corresponding result.
In some embodiments, obtaining an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested further includes:
and respectively acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested according to a preset command.
In some embodiments, further comprising:
acquiring the value of a corresponding bit according to the address of the first register;
acquiring the value of a corresponding bit according to the address of the second register;
acquiring the value of a corresponding bit according to the address of the third register;
and acquiring the value of the corresponding bit according to the address of the fourth register.
In some embodiments, further comprising:
and acquiring and operating the test file.
The scheme provided by the invention realizes the test of the PCIE ASPM function under the shell, and increases the searching ability and the data reading accuracy by checking the comparison register value. And by editing the automatic script script.sh, the automatic test of the ASPM function of all PCIE devices is realized, thereby not only ensuring the test accuracy, but also saving the test time.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 4, an embodiment of the present invention further provides a computer-readable storage medium 601, where the computer-readable storage medium 601 stores computer program instructions 610, and the computer program instructions 610, when executed by a processor, perform the following steps: s1, acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested; s2, obtaining the value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and obtaining the value of a second register corresponding to the root port according to the identification number of the root port; s3, judging whether the value of the first register is not less than the value of the second register; s4, responding to the first register value not less than the second register value, confirming that the test is passed.
In some embodiments, further comprising:
acquiring a value of a third register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the equipment to be tested supports ASPM according to the value of the third register;
and responding to the condition that the to-be-tested equipment does not support the ASPM management, ending the test and outputting a corresponding result.
In some embodiments, further comprising:
and restarting after setting the EFI Shell as a first starting item and setting the ASPM option as a first preset value on a setup interface.
In some embodiments, further comprising:
acquiring a value of a fourth register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the value of the fourth register is a first preset value or not;
and responding to the condition that the value of the fourth register is not the first preset value, ending the test and outputting a corresponding result.
In some embodiments, obtaining an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested further includes:
and respectively acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested according to a preset command.
In some embodiments, further comprising:
acquiring the value of a corresponding bit according to the address of the first register;
acquiring the value of a corresponding bit according to the address of the second register;
acquiring the value of a corresponding bit according to the address of the third register;
and acquiring the value of the corresponding bit according to the address of the fourth register.
In some embodiments, further comprising:
and acquiring and operating the test file.
The scheme provided by the invention realizes the test of the PCIE ASPM function under the shell, and increases the searching ability and the data reading accuracy by checking the comparison register value. And by editing the automatic script script.sh, the automatic test of the ASPM function of all PCIE devices is realized, thereby not only ensuring the test accuracy, but also saving the test time.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. An ASPM test method, characterized by comprising the following steps:
acquiring an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested;
acquiring a value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and acquiring a value of a second register corresponding to the root port according to the identification number of the root port;
judging whether the value of the first register is not less than the value of the second register;
and confirming that the test is passed in response to the value of the first register not being less than the value of the second register.
2. The method of claim 1, further comprising:
acquiring a value of a third register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the equipment to be tested supports ASPM according to the value of the third register;
and responding to the condition that the to-be-tested equipment does not support the ASPM management, ending the test and outputting a corresponding result.
3. The method of claim 1, further comprising:
and resetting the EFI Shell as a first starting item and the ASPM option as a first preset value.
4. The method of claim 3, further comprising:
acquiring a value of a fourth register corresponding to the to-be-tested device according to the identification number of the to-be-tested device;
judging whether the value of the fourth register is a first preset value or not;
and responding to the condition that the value of the fourth register is not the first preset value, ending the test and outputting a corresponding result.
5. The method of claim 1, wherein obtaining an identification number of a device under test and an identification number of a root port corresponding to the device under test, further comprises:
and respectively acquiring the identification number of the device to be tested and the identification number of the root port corresponding to the device to be tested according to a preset command.
6. The method of claim 3, further comprising:
acquiring the value of a corresponding bit according to the address of the first register;
acquiring the value of a corresponding bit according to the address of the second register;
acquiring the value of a corresponding bit according to the address of the third register;
and acquiring the value of the corresponding bit according to the address of the fourth register.
7. The method of claim 1, further comprising:
and acquiring and operating the test file.
8. An ASPM test system, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire an identification number of a device to be tested and an identification number of a root port corresponding to the device to be tested;
the second acquisition module is configured to acquire a value of a first register corresponding to the device to be tested according to the identification number of the device to be tested and acquire a value of a second register corresponding to the root port according to the identification number of the root port;
the judging module is configured to judge whether the value of the first register is not smaller than the value of the second register;
a response module configured to confirm that the test passed in response to the value of the first register being not less than the value of the second register.
9. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of the method according to any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 7.
CN202110415121.2A 2021-04-17 2021-04-17 ASPM test method, system, equipment and storage medium Active CN113127281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110415121.2A CN113127281B (en) 2021-04-17 2021-04-17 ASPM test method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110415121.2A CN113127281B (en) 2021-04-17 2021-04-17 ASPM test method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113127281A true CN113127281A (en) 2021-07-16
CN113127281B CN113127281B (en) 2022-12-27

Family

ID=76777071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110415121.2A Active CN113127281B (en) 2021-04-17 2021-04-17 ASPM test method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113127281B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990260A (en) * 2019-10-31 2020-04-10 苏州浪潮智能科技有限公司 Automatic verification method and system for Extended APIC option function
CN111366841A (en) * 2020-04-07 2020-07-03 华北水利水电大学 FPGA programmable logic unit test equipment and use method
US20200333818A1 (en) * 2019-04-19 2020-10-22 Samsung Electronics Co., Ltd. Power management integrated circuit (pmic), memory module and computing system including a pmic, and method of operating a memory system
CN112416111A (en) * 2020-11-26 2021-02-26 湖南国科微电子股份有限公司 State switching control method and device of PCIe (peripheral component interface express) equipment and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200333818A1 (en) * 2019-04-19 2020-10-22 Samsung Electronics Co., Ltd. Power management integrated circuit (pmic), memory module and computing system including a pmic, and method of operating a memory system
CN110990260A (en) * 2019-10-31 2020-04-10 苏州浪潮智能科技有限公司 Automatic verification method and system for Extended APIC option function
CN111366841A (en) * 2020-04-07 2020-07-03 华北水利水电大学 FPGA programmable logic unit test equipment and use method
CN112416111A (en) * 2020-11-26 2021-02-26 湖南国科微电子股份有限公司 State switching control method and device of PCIe (peripheral component interface express) equipment and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗钧: "《嵌入式数字媒体处理器原理与开发 基于TI达芬奇DM8168系列》", 30 June 2016, 北京航空航天大学出版社 *

Also Published As

Publication number Publication date
CN113127281B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
US20070174705A1 (en) Post (power on self test) debug system and method
CN114168222B (en) Method and device for acquiring time consumption during starting, terminal equipment and storage medium
CN108647140B (en) Test method and test system of mobile terminal
CN113608692B (en) Storage system data consistency verification method, system, equipment and medium
CN108572895B (en) Stability test method for automatically checking software and hardware configuration under Linux
CN108874441B (en) Board card configuration method, device, server and storage medium
US8122293B2 (en) Method for automatically simulating manual testing of a computer, and testing system for performing the method
CN107908490B (en) Method and system for verifying reliability of GPU (graphics processing Unit) register in server DC (direct Current) test
CN107590017B (en) Detection method and device for electronic equipment
CN115510804A (en) Full-chip pin multiplexing automatic verification method, device, equipment and storage medium
CN109800022B (en) Method, system, terminal and storage medium for automatically comparing BIOS information difference
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
CN113127281B (en) ASPM test method, system, equipment and storage medium
CN112216340A (en) Hard disk test method and device, storage medium and electronic equipment
CN112199272A (en) Intelligent terminal testing method and device, terminal equipment and medium
CN111427777A (en) SO L test method, system, equipment and medium
CN110362430A (en) A kind of method being restarted automatically, system and the storage medium of server
CN115794690A (en) Processing method and device based on external equipment in server
CN113160875A (en) Chip test system and test method
CN113220362A (en) Log record obtaining method and device, computer equipment and storage medium
CN110990181A (en) Method and system for automatically reproducing probabilistic setting failure of options in BIOS (basic input/output System)
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN111858198A (en) Multi-scheme memory plugging test method, system, terminal and storage medium
CN115664953B (en) Resource allocation method and related device of external equipment
CN114116291B (en) Log detection method, log detection device, computer device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant