WO2024152604A1 - 一种PCIe器件链路训练管理方法、管理装置及服务器 - Google Patents

一种PCIe器件链路训练管理方法、管理装置及服务器 Download PDF

Info

Publication number
WO2024152604A1
WO2024152604A1 PCT/CN2023/121333 CN2023121333W WO2024152604A1 WO 2024152604 A1 WO2024152604 A1 WO 2024152604A1 CN 2023121333 W CN2023121333 W CN 2023121333W WO 2024152604 A1 WO2024152604 A1 WO 2024152604A1
Authority
WO
WIPO (PCT)
Prior art keywords
link
pcie
preset
training
initial value
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.)
Ceased
Application number
PCT/CN2023/121333
Other languages
English (en)
French (fr)
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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent 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 Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Publication of WO2024152604A1 publication Critical patent/WO2024152604A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of link training technology, and in particular to a PCIe device link training management method, management device and server.
  • the CPU uses the PCIe high-speed bus to exchange data with other peripherals (such as BMC chips, network card chips, NTB, PCIe switch, expandable plug-in cards, etc.).
  • peripherals such as NTB and PCIe switch are generally soldered on the motherboard as key components, which are called onboard components; peripherals such as network cards, FC cards, and sas cards are connected through expansion slots, which are called plug-in components.
  • PCIe equalization technology in PCIe link training, which can adjust the EQ according to the PCIe Tx Preset initial value; the link training from PCIe gen1 to gen3, gen3 to gen4, gen4 to gen5 stages corresponds to the gen3 Tx Preset, gen4 Tx Preset, gen5 Tx Preset, these PCIe transmitter link equalization parameter preset values; each stage will make micro-adjustments based on the Tx Preset initial value;
  • the Intel platform will perform three equalization adjustments for the gen3 stage and more than 10 equalization adjustments for gen4 and gen5.
  • the initial value setting is generally unreasonable, resulting in the inability to complete the training from gen1 to gen3 stages, which leads to link training failure.
  • the present application provides a PCIe device link training management method, a management device and a server.
  • the PCIe device link training management method is used to solve the problem of failure of link training of key PCIe devices on the current server motherboard.
  • the present application provides a PCIe device link training management method, which is used to perform link training management on key PCIe devices on a server motherboard through PCIe equalization technology.
  • the training management method includes a link training failure repair step, which includes:
  • the link training failure repair step further includes:
  • values are taken from the preset value collection of the link equalization parameter of the transmitting end in sequence as the new k-th generation initial value, which is used to perform link retraining on the PCIe device respectively until the PCIe link training is successful.
  • the training management method further includes a link stability checking step;
  • the link stability checking step includes a link activity management step, which includes:
  • link retraining is performed in sequence according to a preset number of retraining retries; each time the link is retrained, the link retraining flag is set to 1, and whether the link activity flag is 1 is determined again according to a second preset time interval.
  • the link stability checking step also includes a link status management step, which includes:
  • the link activity flag is 1, determining whether the link speed in the link status information is less than the expected speed value; in response to the link speed in the link status information being less than the expected speed value, determining that a link speed reduction occurs; wherein the expected speed value matches the minimum specification of the maximum link speed in the link capability register;
  • the link activity flag When the link activity flag is 1, it is determined whether the link bandwidth in the link status information is less than the expected bandwidth value; in response to the link bandwidth in the link status information being less than the expected bandwidth value, it is determined that link degradation has occurred; wherein the expected bandwidth value matches the minimum specification of the maximum link bandwidth in the link capability register.
  • the link state management step further includes:
  • link disabling and enabling operations are performed in sequence according to the preset number of disabling and enabling repetitions; each time the link disabling and enabling operation is performed, the disabling bit in the link control register is set, and the time interval between disabling and enabling is set according to the preset operation time interval, and the link status information is re-read according to the second waiting time to determine whether the link status is normal.
  • the link activity management step also includes:
  • the link activity flag being 1
  • the preset number of retraining retries and link training negotiation result information are printed to the log and written into the CPLD register; wherein the link training negotiation result information includes a new k-th generation initial value corresponding to when the link retraining is successful.
  • the link state management step further includes:
  • the training management method further includes:
  • the link activity management step further includes:
  • the link retraining is performed in sequence according to the preset retraining retry times and the link activity flag is not 1, the preset retraining retry times are reset.
  • the number of attempts and link training failure flag are printed to the log and written to the CPLD register.
  • the link state management step further includes:
  • the preset disabling and enabling repetition times and the link training failure flag are printed to the log and written into the CPLD register.
  • the training management method further includes:
  • the training management method further includes:
  • a set of preset values of the link equalization parameters at the transmitting end is obtained; wherein the set of preset values of the link equalization parameters at the transmitting end includes a default preset initial value Px.
  • the training management method further includes:
  • the default preset initial value Px is used as the k-th generation initial value to perform PCIe link training on the PCIe root port of the server CPU.
  • a default preset initial value Px is obtained from a set of preset values of the transmitter link equalization parameters set for the k-th generation PCIe protocol as the k-th generation initial value for link training of the PCIe device, specifically including:
  • the default preset initial value Px is obtained from the preset value collection of the link equalization parameter at the transmitting end as the kth generation initial value, which is used to perform link training on the CPU root port corresponding to the link where the PCIe device is located.
  • the basic input and output system firmware is used to obtain and determine whether the vendor ID and device ID of the PCIe device can be read normally, so as to determine whether the PCIe link training between the PCIe bus and the CPU root port is successful.
  • the training management method further includes:
  • a collection of preset values of the transmitter link equalization parameters is set through registers to perform link training on the CPU root port corresponding to the link where the PCIe device is located.
  • the present application also provides a PCIe device link training management device, which is used to perform link training management on key PCIe devices on a server mainboard through PCIe equalization technology.
  • the training management device includes a link training failure repair unit, which includes:
  • a link training unit is used to obtain a default preset initial value Px from a set of preset values of a link equalization parameter of a transmitting end set for a k-th generation PCIe protocol as a k-th generation initial value, and to perform link training on a PCIe device; wherein the k-th generation initial value is an initial value of a link equalization parameter of a transmitting end when performing equalization adjustment for the k-th generation PCIe protocol, and k is not less than 2; and the data of the set of preset values of the link equalization parameter of the transmitting end are arranged in order according to the numerical value;
  • a link training judgment unit used to judge whether the vendor ID and device ID of the PCIe device can be read normally after link training is performed on the PCIe device through the kth generation initial value
  • a training failure determination unit is used to determine PCIe link training failure when the vendor ID and device ID cannot be read normally
  • a link retraining unit used to obtain a preset initial value Py from a preset value collection of link equalization parameters at the transmitting end according to a preset value taking rule as a new k-th generation initial value, and used to perform link retraining on the PCIe device;
  • a link retraining judgment unit used to judge whether the vendor ID and the device ID of the PCIe device can be read normally according to the first waiting time after link retraining of the PCIe device;
  • the link retraining success determination unit is used to determine that the PCIe link training is successful when the vendor ID and the device ID can be read normally after the link retraining.
  • the present application further provides a computer device, including a memory, a processor, and a computer program.
  • the computer program is stored in the memory and can be run on the processor.
  • the processor executes the computer program, the following steps are implemented:
  • the present application further provides a non-volatile computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
  • the present application further provides a server, including a key PCIe device disposed on a mainboard, wherein the PCIe device implements link training management through the aforementioned PCIe device link training management method.
  • the PCIe device link training management method of the present application is used to perform link training management on key PCIe devices on a server mainboard through PCIe equalization technology;
  • the training management method includes a link training failure repair step, which includes:
  • a default preset initial value Px is obtained as the kth generation initial value for link training of the PCIe device
  • a preset initial value Py is obtained as a new k-th generation initial value for link retraining of the PCIe device
  • a preset value collection of the link equalization parameter of the transmitting end is set in advance for the k-th generation PCIe protocol, and a default preset initial value Px can be obtained from the preset value collection of the link equalization parameter of the transmitting end, and a preset initial value Py can be obtained according to a preset value rule;
  • FIG1 is a schematic diagram of 10 groups of Tx preset values for link training in the prior art
  • FIG2 is a flow chart of a PCIe device link training management method in Embodiment 1 of the present application.
  • FIG3 is a schematic diagram of the overall process of the link training management method in the actual embodiment of the present application.
  • FIG. 4 is a structural block diagram of a PCIe device link training management method apparatus in Embodiment 2 of the present application;
  • FIG. 5 is a diagram showing the internal structure of a computer device in Embodiment 2 of the present application.
  • the gen3, gen4, and gen5 stages of PCIe link training each have 10 groups of Tx preset values Tx Preset (i.e., preset values of link equalization parameters at the transmitting end).
  • the default preset value will be set during the startup phase of the BIOS (i.e., the basic input and output system firmware) (for example, the default preset value of the Intel xx platform is P7); however, actual tests have found that the P7 preset value in the gen3 phase does not meet the SI parameter requirements of the current motherboard PCB and key PCIe devices;
  • the present application provides a PCIe device link training management method, management device and server to solve the above problems.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • an embodiment of the present application provides a PCIe device link training management method, which is used to perform link training management on key PCIe devices on a server motherboard through PCIe equalization technology.
  • the training management method includes a link training failure repair step, which includes:
  • S2 obtains a default preset initial value Px from a collection of preset values of the link equalization parameters of the transmitting end set for the k-th generation PCIe protocol as the k-th generation initial value for link training of the PCIe device; wherein the k-th generation initial value is the initial value of the link equalization parameter of the transmitting end when the equalization adjustment is performed for the k-th generation PCIe protocol, and k is not less than 2; the data of the collection of preset values of the link equalization parameters of the transmitting end are arranged in order according to the numerical value;
  • S3 After performing link training on the PCIe device using the kth generation initial value, S3 determines whether the vendor ID and device ID of the PCIe device can be read normally;
  • S4 obtains a preset initial value Py from a preset value collection of link equalization parameters at the transmitting end according to a preset value selection rule, as a new k-th generation initial value for link retraining of the PCIe device;
  • vendor ID and the device ID can be read normally after the link retraining in S51, it is determined that the PCIe link training is successful.
  • the training management method includes a link training failure repair step, which includes:
  • a default preset initial value Px is obtained as the kth generation initial value for link training of the PCIe device
  • a preset initial value Py is obtained as a new k-th generation initial value for link retraining of the PCIe device
  • a preset value collection of the link equalization parameter of the transmitting end is set in advance for the k-th generation PCIe protocol, and a default preset initial value Px can be obtained from the preset value collection of the link equalization parameter of the transmitting end, and a preset initial value Py can be obtained according to a preset value rule;
  • PCIe stands for PCI-Express (peripheral component interconnect express), which is a high-speed serial computer expansion bus standard.
  • PCIe Tx Preset represents the preset value of the link equalization parameter of the PCIe transmitter.
  • PCIe SI represents the PCIe signal parameter.
  • PCIe gen3, gen4, and gen5 represent the PCIe protocol generations, and can also be used to indicate the speeds that can be achieved after PCIe link negotiation. From gen1 to gen5, the supported speeds are 2.5GT/s, 5.0GT/s, 8.0GT/s, 16.0GT/s, and 32.0GT/s, respectively.
  • the link training management method mainly includes the following stages:
  • Phase 1 Initiate link training for PCIe during the Bios startup phase. Before link training, set the gen3 Tx Preset initial value of the CPU RootPort (i.e., root port) corresponding to the link where the onboard key PCIe device is located to the register;
  • the CPU RootPort i.e., root port
  • Phase 2 When training the CPU PCIe root port, use the gen3 Tx Preset initial value to perform PCIe link training;
  • Phase 3 Bios determines whether the PCIe link training between the PCIe bus and the CPURootPort is successful by checking whether the VID (vendor ID) and DID (device ID) of the onboard key PCIe devices can be read normally.
  • Phase 4 After the initial value of PCIe Gen3 Tx Preset is modified, a link retraining operation is initiated for the rootport port to which the key PCIe device is connected. Then, after waiting for 15ms, a check is made to see whether the VID and DID of the key PCIe device can be read normally.
  • the initial value of Tx Preset in the gen3 stage is adaptively adjusted through BIOS according to the link training results; then the PCIe link training is re-initiated to solve the startup failure problem of key PCIe devices on the motherboard with poor SI consistency.
  • the training management method further includes:
  • the link training is judged to be successful, and a log is recorded; the BIOS continues to run.
  • the link training failure repair step further includes:
  • S522 takes values from the preset value collection of the link equalization parameter of the transmitting end in accordance with the preset value increasing direction and/or the preset value decreasing direction in the preset value taking rule, and uses them as the new k-th generation initial value, which is used to perform link retraining on the PCIe device respectively until the PCIe link training is successful.
  • the data of the preset value set of the link equalization parameter of the transmitting end are arranged in order of numerical value; a value can be taken from the preset value set of the link equalization parameter of the transmitting end according to a preset value taking rule and used as the initial value of the kth generation to perform link training or link retraining on the PCIe device.
  • adaptive adjustment and link training may be performed cyclically:
  • Phase 4 After the initial value of PCIe Gen3 Tx Preset is modified, a link retraining operation is initiated for the rootport port to which the key PCIe device is connected. Then, after waiting for 15ms, a check is made to see whether the VID and DID of the key PCIe device can be read normally.
  • the link training is ensured to be successful by cyclically performing adaptive adjustment and cyclically performing link training.
  • link training fails, no retries are performed, a log is recorded, a link training failure flag is recorded to the CPLD, and the link training process of the key PCIe device is exited.
  • the training management method further includes:
  • stage 5 of the link training management method it further includes:
  • link training fails, no retries are performed, a log is recorded, a link training failure flag is recorded to the CPLD, and the link training process of the key PCIe device is exited.
  • the training management method further includes a link stability checking step;
  • the link stability checking step includes a link activity management step, which includes:
  • S6 determines whether the link activity flag is 1;
  • link activity flag is not 1, link retraining is performed in sequence according to the preset number of retraining retries; each time the link is retrained, the link retraining flag is set to 1, and whether the link activity flag is 1 is determined again according to the second preset time interval.
  • the link stability checking step in the link training management method includes a link activity management step, which includes:
  • Phase 6 After the key PCIe device link training is successful, a link activity check is performed to check whether the link activity flag bit of the link_status register (i.e., link status register) on the root port is 1, which is used to determine whether the connection between the root port and the device below is normal.
  • link_status register i.e., link status register
  • the Bios will print the number of retries and negotiation results to the log and write them to the CPLD register;
  • link activity flag If the link activity flag is not 1, write 1 to the link retraining flag of the link_control register (link control register) of the root port, and then wait for 15ms to check whether the link activity flag is 1;
  • the link activity management step further includes:
  • the link activity flag is 1, the preset number of retraining retries and link training negotiation result information are printed into the log and written into the CPLD register; wherein the link training negotiation result information includes the new k-th generation initial value corresponding to the successful link retraining.
  • the Bios in the link activity management step of phase 6, if the link activity flag is 1, the Bios will print the number of retries and the negotiation result to the log and write them into the CPLD register at the same time.
  • the link activity management step further includes:
  • the link activity management step in stage 6 also includes:
  • the Bios will print the number of retries and the link training failure flag to the log and write them to the CPLD register, and exit the link training process of the key PCIe device.
  • the link stability checking step further includes a link status management step, which includes:
  • the link stability checking step in the link training management method includes a link status management step, which includes:
  • Stage 7 After the link activity of the key PCIe device is normal, the link status is checked, mainly the link speed and link channel width.
  • the inspection method is as follows:
  • the expected value is the minimum specification of the maximum link speed and maximum link width in the link capability registers of the upstream and downstream devices of the link where the PCIe device is located;
  • the link state management step further includes:
  • the link status management step of stage 7 if the link status check is normal (for example, whether the negotiated bandwidth and rate are equal to the expected values), a log is recorded, a link training success flag is written to the CPLD register, and the link training process of the key PCIe device is exited.
  • the link state management step further includes:
  • link disabling and enabling operations are performed in sequence according to the preset disabling and enabling repetition times; each time the link disabling and enabling operation is performed, the disabling bit in the link control register is set, and the time interval between disabling and enabling is set according to the preset operation time interval, and the link status information is re-read according to the second waiting time to determine whether the link status is normal.
  • the link state management step further includes:
  • Stage 8 When the link speed drops or the link is downgraded, initiate three link disabling and link enabling operations:
  • the disable bit of the link_control register (link control register) in the RootPort configuration space is set to achieve a disabling and enabling process.
  • the time interval between disabling and enabling is set to 200ms. After waiting for 100ms, the value of the link status in the configuration space is read again.
  • the link state management step further includes:
  • the link state management step in stage 8 also includes:
  • the Bios will print the number of retries and the link training failure flag to the log and write them to the CPLD register, and exit the link training process of the key PCIe device.
  • the training management method before S2, the training management method further includes:
  • S1 obtains a set of preset values of the link equalization parameters at the transmitting end according to the PCIe signal parameter characteristics of the server motherboard and the large-scale sample test requirements of the server motherboard; wherein the set of preset values of the link equalization parameters at the transmitting end includes a default preset initial value Px.
  • the training management method further includes:
  • the default preset initial value Px is used as the k-th generation initial value to perform PCIe link training on the PCIe root port of the server CPU.
  • the training management method before S2, the training management method further includes:
  • a collection of preset values of the transmitter link equalization parameters is set through registers to perform link training on the CPU root port corresponding to the link where the PCIe device is located.
  • the link training management method includes the following stages:
  • Phase 1 Initiate link training for PCIe during the Bios startup phase. Before link training, set the gen3 Tx Preset initial value of the CPU RootPort (i.e., root port) corresponding to the link where the onboard key PCIe device is located to the register;
  • the CPU RootPort i.e., root port
  • Phase 2 When training the CPU PCIe root port, use the gen3 Tx Preset initial value to perform PCIe link training.
  • S2 specifically includes:
  • the default preset initial value Px is obtained from the preset value collection of the link equalization parameter at the transmitting end as the kth generation initial value, which is used to perform link training on the CPU root port corresponding to the link where the PCIe device is located.
  • S3 specifically includes:
  • the basic input and output system firmware is used to obtain and determine whether the vendor ID and device ID of the PCIe device can be read normally, so as to determine whether the PCIe link training between the PCIe bus and the CPU root port is successful.
  • the link training management method also includes the following stages:
  • Phase 3 Bios determines whether the PCIe link training between the PCIe bus and the CPURootPort is successful by checking whether the VID (vendor ID) and DID (device ID) of the onboard key PCIe devices can be read normally.
  • the training management method also includes:
  • Phase 1 Initiate link training for PCIe during the Bios startup phase. Before link training, set the gen3 Tx Preset initial value of the CPU RootPort (i.e., root port) corresponding to the link where the onboard key PCIe device is located to the register;
  • the CPU RootPort i.e., root port
  • Phase 2 When training the CPU PCIe root port, use the gen3 Tx Preset initial value to perform PCIe link training.
  • the PCIe device link training management method provided by the present application has the following advantages:
  • steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the embodiment of the present application further provides a PCIe device link training management device, which is used to perform link training management on key PCIe devices on a server motherboard through PCIe equalization technology.
  • the training management device includes a link training failure repair unit, which includes:
  • a link training unit is used to obtain a default preset initial value Px from a set of preset values of a link equalization parameter of a transmitting end set for a k-th generation PCIe protocol as a k-th generation initial value, and to perform link training on a PCIe device; wherein the k-th generation initial value is an initial value of a link equalization parameter of a transmitting end when performing equalization adjustment for the k-th generation PCIe protocol, and k is not less than 2; and the data of the set of preset values of the link equalization parameter of the transmitting end are arranged in order according to the numerical value;
  • a link training judgment unit is used to judge the supply of the PCIe device after link training the PCIe device through the kth generation initial value. Whether the merchant ID and device ID can be read normally;
  • a training failure determination unit is used to determine PCIe link training failure when the vendor ID and device ID cannot be read normally
  • a link retraining unit used to obtain a preset initial value Py from a preset value collection of link equalization parameters at the transmitting end according to a preset value taking rule as a new k-th generation initial value, and used to perform link retraining on the PCIe device;
  • a link retraining judgment unit used to judge whether the vendor ID and the device ID of the PCIe device can be read normally according to the first waiting time after link retraining of the PCIe device;
  • the link retraining success determination unit is used to determine that the PCIe link training is successful when the vendor ID and the device ID can be read normally after the link retraining.
  • the link training failure repair unit further includes:
  • a link retraining failure determination unit configured to determine that the PCIe link training has failed if the vendor ID and the device ID of the PCIe device cannot be read normally after the link retraining;
  • the cyclic link retraining unit is used to sequentially take values from the preset value collection of the link equalization parameter of the transmitting end according to the preset value increasing direction and/or the preset value decreasing direction in the preset value taking rule as the new k-th generation initial value, and to perform link retraining on the PCIe device respectively until the PCIe link training is successful.
  • the training management device further includes a link stability checking unit;
  • the link stability checking unit includes a link activity management unit, which includes:
  • a link activity flag bit determination unit used to determine whether the link activity flag bit is 1 after determining that the PCIe link training is successful
  • the link activity recovery unit is used to perform link retraining in sequence according to a preset number of retraining retries if the link activity flag is not 1; each time the link is retrained, the link retraining flag is set to 1, and whether the link activity flag is 1 is determined again according to a second preset time interval.
  • the training management device further includes a link state management unit, which includes:
  • the link disabling enabling operation unit is used to perform link disabling enabling operations in sequence according to a preset number of disabling enabling repetitions when link speed reduction and/or link channel reduction occurs; each time the link disabling enabling operation is performed, the disabling bit in the link control register is set, and the time interval between disabling and enabling is set according to a preset operation time interval, and the link status information is re-read according to a second waiting time to determine whether the link status is normal.
  • the link stability checking unit further includes a link status management unit, which includes:
  • a link speed reduction determination unit used for determining whether the link speed in the link status information is less than the expected speed value when the link activity flag is 1; if so, determining that the link speed reduction occurs; wherein the expected speed value matches the minimum specification of the maximum link speed in the link capability register;
  • the link degradation determination unit is used to determine whether the link bandwidth in the link status information is less than the expected bandwidth value when the link activity flag is 1; if less than, determine that the link degradation occurs; wherein the expected bandwidth value matches the minimum specification of the maximum link bandwidth in the link capability register.
  • the link retraining success determination unit is further configured to:
  • the link activity flag is 1, the preset number of retraining retries and link training negotiation result information are printed to the log and written into the CPLD register; wherein the link training negotiation result information includes the new k-th generation initial value corresponding to the successful link retraining.
  • the link retraining success determination unit is further configured to:
  • the link retraining success determination unit is further configured to:
  • the vendor ID and device ID of the PCIe device can be read normally, it is determined that the PCIe link training is successful and a log is recorded.
  • the link retraining failure determination unit is further configured to:
  • the link retraining failure determination unit is further configured to:
  • the preset disabling and enabling repetition times and the link training failure flag are printed to the log and written into the CPLD register.
  • the link retraining failure determination unit is further configured to:
  • the training management device further includes:
  • the preset value collection acquisition unit is used to obtain the preset value collection of the transmitting end link equalization parameter according to the PCIe signal parameter characteristics of the server motherboard and the large-scale sample test requirements of the server motherboard; wherein the preset value collection of the transmitting end link equalization parameter includes a default preset initial value Px.
  • the link training unit is further configured to:
  • the default preset initial value Px is used as the k-th generation initial value to perform PCIe link training on the PCIe root port of the server CPU.
  • Each module in the above device can be implemented in whole or in part by software, hardware, or a combination thereof.
  • Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
  • the above-mentioned computer device may be a terminal, which includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection.
  • the display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen
  • the input device of the computer device may be a touch layer covering the display screen, or a button, a trackball or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
  • the structure shown in the above figure is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied.
  • the specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
  • the implementation of all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program.
  • the program may be stored in a non-volatile computer-readable storage medium.
  • the computer program When executed, it may include the processes of the embodiments of the above-mentioned methods.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous link (Synchlink) DRAM
  • SLDRAM synchronous link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

本申请涉及一种PCIe器件链路训练管理方法、管理装置、服务器、设备和存储介质,训练管理方法包括链路训练失败修复步骤,其包括:获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;判断PCIe器件的供应商ID、设备ID能否被正常读取;若不能被正常读取,则判定PCIe链路训练失败;获取预设初始值Py、作为新的第k代初始值,用于进行链路再训练;在对PCIe器件进行链路再训练后,按照第一等待时间再次判断PCIe器件的供应商ID、设备ID能否被正常读取;若能被正常读取,则判定PCIe链路训练成功。通过上述技术方案,可解决目前服务器主板上关键PCIe器件链路训练失败的问题。

Description

一种PCIe器件链路训练管理方法、管理装置及服务器
本申请要求于2023年1月19日提交中国专利局、申请号为202310061710.4、发明名称为“一种PCIe器件链路训练管理方法、管理装置及服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及链路训练技术领域,尤其是指一种PCIe器件链路训练管理方法、管理装置及服务器。
背景技术
基于X86平台的服务器或存储服务器上,CPU使用PCIe高速总线与其他外设(如BMC芯片、网卡芯片、NTB、PCIe switch、可扩展的外插卡等)进行数据交互。其中,NTB、PCIe switch等外设一般作为关键器件焊接在主板上,称为板载器件;网卡、FC卡、sas卡等外设通过扩展槽进行连接,称为外插器件。
板载器件由于焊接在主板上,PCIe走线等都固化在PCB板上,因此要保证主板上PCIe链路SI信号的一致性。但是,当服务器生产数量很大时,难免出现一些一致性较差的主板;另外,板载器件的一致性也会有一定差异。这就导致个别主板的关键器件会因PCIe链路SI表现较差、而出现PCIe链路训练失败的情况。
PCIe链路训练中有PCIe均衡技术,其可以根据PCIe Tx Preset初值对EQ的均衡调整;从PCIe gen1到gen3、gen3到gen4、gen4到gen5阶段的链路训练,分别对应gen3 Tx Preset、gen4 Tx Preset、gen5 Tx Preset这几个PCIe发送端链路均衡参数预设值;每个阶段会在Tx Preset初值基础上进行微调整;
目前,intel平台针对gen3阶段会进行3次均衡调整,针对gen4、gen5会进行10次以上的均衡调整;其中,一般在gen3阶段会出现因初值设置不合理、导致无法完成gen1到gen3阶段训练的情况,从而导致链路训练失败。
发明内容
为了解决上述技术问题,本申请提供了一种PCIe器件链路训练管理方法、管理装置及服务器,PCIe器件链路训练管理方法用于解决目前服务器主板上关键PCIe器件链路训练失败的问题。
为实现上述目的,本申请提供一种PCIe器件链路训练管理方法,用于通过PCIe均衡技术对服务器主板关键PCIe器件进行链路训练管理,训练管理方法包括链路训练失败修复步骤,其包括:
从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;其中,第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
在通过第k代初始值对PCIe器件进行链路训练之后,判断PCIe器件的供应商ID、设备ID能否被正常读取;
响应于不能被正常读取,则判定PCIe链路训练失败;
从发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
在对PCIe器件进行链路再训练后,按照第一等待时间再次判断PCIe器件的供应商ID、设备ID能否被正常读取;
响应于进行链路再训练后供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功。
进一步的,在按照第一等待时间再次判断PCIe器件的供应商ID、设备ID能否被正常读取之后,链路训练失败修复步骤还包括:
响应于进行链路再训练后PCIe器件的供应商ID、设备ID不能被正常读取,则判定PCIe链路训练失败;
按照预设取值规则中的预设值增大方向和/或预设值减小方向依次从发送端链路均衡参数预设值合集中取值、作为新的第k代初始值,用于分别对PCIe器件进行链路再训练、直至PCIe链路训练成功。
进一步的,训练管理方法还包括链路稳定性检查步骤;链路稳定性检查步骤包括链路活跃度管理步骤,其包括:
在判定PCIe链路训练成功之后,判断链路活跃度标志位是否为1;
响应于链路活跃度标志位不为1,则按照预设再训练重试次数依次进行链路再训练;每次链路再训练时,将链路再训练标志位设为1、并按照第二预设时间间隔再次判断链路活跃度标志位是否为1。
进一步的,链路稳定性检查步骤还包括链路状态管理步骤,其包括:
当链路活跃度标志位为1时,判断链路状态信息中的链路速度是否小于速度预期值;响应于链路状态信息中的链路速度小于速度预期值,则判定发生链路降速;其中,速度预期值与链路能力寄存器中最大链路速度的最小规格相匹配;
当链路活跃度标志位为1时,判断链路状态信息中的链路带宽是否小于带宽预期值;响应于链路状态信息中的链路带宽小于带宽预期值,则判定发生链路降道;其中,带宽预期值与链路能力寄存器中最大链路带宽的最小规格相匹配。
进一步的,链路状态管理步骤还包括:
当发生链路降速和/或链路降道时,按照预设失能使能重复次数依次进行链路失能使能操作;每次链路失能使能操作时,设置链路控制寄存器中的失能位、并按照预设操作时间间隔设置失能与使能的时间间隔,按照第二等待时间重新读取链路状态信息,用于判断链路状态是否正常。
进一步的,链路活跃度管理步骤还包括:
响应于链路活跃度标志位为1,则将预设再训练重试次数、链路训练协商结果信息打印到日志、并写入CPLD寄存器中;其中,链路训练协商结果信息包括链路再训练成功时对应的新的第k代初始值。
进一步的,链路状态管理步骤还包括:
当链路状态信息正常时,记录日志、并向CPLD寄存器中写入链路训练成功标志。
进一步的,在判断PCIe器件的供应商ID、设备ID能否被正常读取之后,训练管理方法还包括:
响应于PCIe器件的供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功、并记录日志。
进一步的,在照预设再训练重试次数依次进行链路再训练之后,链路活跃度管理步骤还包括:
当按照预设再训练重试次数依次进行链路再训练后、链路活跃度标志位均不为1时,将预设再训练重 试次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
进一步的,在按照预设失能使能重复次数依次进行链路失能使能操作之后,链路状态管理步骤还包括:
当按照预设失能使能重复次数依次进行链路失能使能操作后、每次重试均发生链路降速和/或链路降道时,将预设失能使能重复次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
进一步的,在按照预设取值规则中的预设值增大方向和/或预设值减小方向依次从发送端链路均衡参数预设值合集中取值、作为新的第k代初始值之后,训练管理方法还包括:
在按照预设取值规则中的预设值增大方向和/或预设值减小方向依次遍历发送端链路均衡参数预设值合集中数值、作为新的第k代初始值之后,当所有链路再训练均失败时,记录日志、并将链路训练失败标志写入CPLD寄存器中。
进一步的,在从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值之前,训练管理方法还包括:
根据服务器主板PCIe信号参数特性、以及服务器主板大规模样本测试要求获取发送端链路均衡参数预设值合集;其中,发送端链路均衡参数预设值合集包括默认预设初始值Px。
进一步的,在从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值之后,训练管理方法还包括:
将默认预设初始值Px作为第k代初始值,对服务器CPU的PCIe根端口进行PCIe链路训练。
进一步的,从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练,具体包括:
从发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件所在链路对应的CPU根端口进行链路训练。
进一步的,在通过第k代初始值对PCIe器件进行链路训练之后,判断PCIe器件的供应商ID、设备ID能否被正常读取,具体包括:
通过基本输入输出系统固件获取并判断PCIe器件的供应商ID以及设备ID能否被正常读取,用于判断PCIe总线与CPU根端口的PCIe链路训练是否成功。
进一步的,在从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练之前,训练管理方法还包括:
通过寄存器设置发送端链路均衡参数预设值合集,用于对PCIe器件所在链路对应的CPU根端口进行链路训练。
本申请还提供一种PCIe器件链路训练管理装置,用于通过PCIe均衡技术对服务器主板关键PCIe器件进行链路训练管理,训练管理装置包括链路训练失败修复单元,其包括:
链路训练单元,用于从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;其中,第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
链路训练判断单元,用于在通过第k代初始值对PCIe器件进行链路训练之后,判断PCIe器件的供应商ID、设备ID能否被正常读取;
训练失败判定单元,用于供应商ID、设备ID不能被正常读取时,判定PCIe链路训练失败;
链路再训练单元,用于从发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
链路再训练判断单元,用于在对PCIe器件进行链路再训练后,按照第一等待时间判断PCIe器件的供应商ID、设备ID能否被正常读取;
链路再训练成功判定单元,用于进行链路再训练后供应商ID、设备ID能被正常读取时,判定PCIe链路训练成功。
本申请又提供一种计算机设备,包括存储器、处理器及计算机程序,计算机程序存储在存储器上并可在处理器上运行,处理器执行计算机程序时实现以下步骤:
从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;其中,第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
在通过第k代初始值对PCIe器件进行链路训练之后,判断PCIe器件的供应商ID、设备ID能否被正常读取;
响应于不能被正常读取,则判定PCIe链路训练失败;
从发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
在对PCIe器件进行链路再训练后,按照第一等待时间再次判断PCIe器件的供应商ID、设备ID能否被正常读取;
响应于进行链路再训练后供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功。
本申请再提供一种非易失性计算机可读存储介质,其存储有计算机程序,计算机程序被处理器执行时实现以下步骤:
从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;其中,第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
在通过第k代初始值对PCIe器件进行链路训练之后,判断PCIe器件的供应商ID、设备ID能否被正常读取;
响应于不能被正常读取,则判定PCIe链路训练失败;
从发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
在对PCIe器件进行链路再训练后,按照第一等待时间再次判断PCIe器件的供应商ID、设备ID能否被正常读取;
响应于进行链路再训练后供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功。
本申请另提供一种服务器,包括设于主板上的关键PCIe器件,PCIe器件通过前述的PCIe器件链路训练管理方法来实现链路训练管理。
本申请的上述技术方案,相比现有技术具有以下技术效果:
本申请的PCIe器件链路训练管理方法,用于通过PCIe均衡技术对服务器主板关键PCIe器件进行链路训练管理;
训练管理方法包括链路训练失败修复步骤,其包括:
先获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;
再判断PCIe器件的供应商ID、设备ID能否被正常读取;响应于不能被正常读取,则判定PCIe链路训练失败;
接着,获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
然后再次判断PCIe器件的供应商ID、设备ID能否被正常读取;响应于进行链路再训练后供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功;
其中,预先针对第k代PCIe协议设置发送端链路均衡参数预设值合集,从发送端链路均衡参数预设值合集中可获取默认预设初始值Px、以及按照预设取值规则获取预设初始值Py;
由此,当供应商ID、设备ID能被正常读取时,可判定PCIe链路训练成功,从而解决目前服务器主板上关键PCIe器件链路训练失败的问题。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1是现有技术中链路训练10组Tx预设值的示意图;
图2是本申请实施例一中PCIe器件链路训练管理方法的流程示意图;
图3是本申请实际实施例中链路训练管理方法的整体流程示意图;
图4是本申请实施例二中PCIe器件链路训练管理方法装置的结构框图;
图5为本申请实施例二中计算机设备的内部结构图。
实施方式
如图1所示,现有技术中,PCIe链路训练的gen3、gen4、gen5阶段各有10组Tx预设值Tx Preset(即发送端链路均衡参数预设值)。
Bios(即基本输入输出系统固件)启动阶段会设置默认预设值(比如Intel xx平台默认预设值初值是P7);但实际测试发现gen3阶段P7预设值不符合与当前主板PCB及关键PCIe器件的SI参数要求;
对当前主板进行多样本测试,发现gen3阶段Tx Preset=P4时更能满足SI参数要求;但Tx Preset=P4时不能满足所有主板的SI参数要求,当个别主板及关键PCIe器件的SI参数出现一致性差异时,仍然会出现gen3阶段链路训练失败的情况。
为此,本申请提供一种PCIe器件链路训练管理方法、管理装置及服务器,来解决上述问题。
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
实施例一:
如图2所示,本申请实施例提供一种PCIe器件链路训练管理方法,用于通过PCIe均衡技术对服务器主板关键PCIe器件进行链路训练管理,训练管理方法包括链路训练失败修复步骤,其包括:
S2从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;其中,第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
S3在通过第k代初始值对PCIe器件进行链路训练之后,判断PCIe器件的供应商ID、设备ID能否被正常读取;
S31若不能被正常读取,则判定PCIe链路训练失败;
S4从发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
S5在对PCIe器件进行链路再训练后,按照第一等待时间再次判断PCIe器件的供应商ID、设备ID能否被正常读取;
S51若进行链路再训练后供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功。
在具体实施例中,训练管理方法包括链路训练失败修复步骤,其包括:
先获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;
再判断PCIe器件的供应商ID、设备ID能否被正常读取;若不能被正常读取,则判定PCIe链路训练失败;
接着,获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
然后再次判断PCIe器件的供应商ID、设备ID能否被正常读取;若进行链路再训练后供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功;
其中,预先针对第k代PCIe协议设置发送端链路均衡参数预设值合集,从发送端链路均衡参数预设值合集中可获取默认预设初始值Px、以及按照预设取值规则获取预设初始值Py;
.由此,当供应商ID、设备ID能被正常读取时,可判定PCIe链路训练成功,从而解决目前服务器主板上关键PCIe器件链路训练失败的问题。
在实际中,PCIe代表PCI-Express(peripheral component interconnect express),其是一种高速串行计算机扩展总线标准。
PCIe Tx Preset代表PCIe发送端链路均衡参数预设值。PCIe SI代表PCIe信号参数。
PCIe gen3、gen4、gen5代表PCIe协议代次,也可以用来表示PCIe link协商后所能达到的速度,从gen1到gen5,其支持的速度分别为2.5GT/s、5.0GT/s、8.0GT/s、16.0GT/s、32.0GT/s。
如图3所示,在实际实施例中,链路训练管理方法主要包括如下阶段:
阶段1、Bios启动阶段对PCIe发起链路训练,链路训练之前设置板载关键PCIe器件所在链路对应的CPU RootPort(即根端口)的gen3 Tx Preset初始值到寄存器中;
其中,gen3 Tx Preset初始值为硬件根据服务器主板PCIe SI参数特性、并进行大量样本测试获取的预设初始值(如:gen3 Tx Preset=P4);
阶段2、对应CPU PCIe根端口训练时,使用gen3 Tx Preset初始值进行PCIe链路训练;
阶段3、Bios通过检查板载关键PCIe器件的VID(即供应商ID)、DID(即设备ID)是否可以正常读取、来判断该PCIe总线与CPURootPort的PCIe链路训练是否成功。
当可以正常读取到板载关键PCIe器件的VID、DID时,判断链路训练成功,记录日志;bios继续运行;
当无法读取到板载关键PCIe器件的VID、DID时,调整板载关键PCIe器件所在链路对应的CPU RootPort的PCIe Gen3 Tx Preset初始值、进行链路重试,PCIe Gen3 Tx Preset初始值调整方法详见阶段5。
阶段4、PCIe Gen3 Tx Preset初始值修改后,对关键PCIe器件连接的rootport端口发起链路再训练操作,然后等待15ms后检查关键PCIe器件的VID、DID是否可以正常读取;
当可以正常读取到板载关键PCIe器件的VID、DID时,判断链路训练成功,记录日志,bios继续运行;
否则重复阶段4、阶段5;
阶段5、PCIe Gen3 Tx Preset初始值调整按如下算法进行:
从默认预设初始值P4开始,先向预设值增大方向设置一次(如:PCIe Gen3 Tx Preset=P5),然后发起PCIe链路再训练;
如果链路训练判断失败,再向预设初始值减小方向进行设置一次(如:PCIe Gen3 Tx Preset=P3),然后发起PCIe链路再训练;
直到两个方向预设值分别达到P0和P9。
综上,在不改变CPU端对PCIe链路训练算法的情况下,通过bios根据链路训练结果对gen3阶段Tx Preset初值进行自适应调整;然后重新发起PCIe链路训练,以解决SI一致性较差的主板关键PCIe器件的启动失败问题。
在一个实施方式中,在S3之后,训练管理方法还包括:
S32若PCIe器件的供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功、并记录日志。
在实际实施例中,当可以正常读取到板载关键PCIe器件的VID、DID时,判断链路训练成功,记录日志;bios继续运行。
在一个实施方式中,在S5之后,链路训练失败修复步骤还包括:
S521若进行链路再训练后PCIe器件的供应商ID、设备ID不能被正常读取,则判定PCIe链路训练失 败;
S522按照预设取值规则中的预设值增大方向和/或预设值减小方向依次从发送端链路均衡参数预设值合集中取值、作为新的第k代初始值,用于分别对PCIe器件进行链路再训练、直至PCIe链路训练成功。
在具体实施例中,发送端链路均衡参数预设值合集的数据按照数值大小依次排列;可按照预设取值规则从发送端链路均衡参数预设值合集中取值、作为第k代初始值,来对PCIe器件进行链路训练或链路再训练。
在实际实施例中,链路训练管理方法中,还可循环进行自适应调整、循环进行链路训练:
阶段4、PCIe Gen3 Tx Preset初始值修改后,对关键PCIe器件连接的rootport端口发起链路再训练操作,然后等待15ms后检查关键PCIe器件的VID、DID是否可以正常读取;
当可以正常读取到板载关键PCIe器件的VID、DID时,判断链路训练成功,记录日志,bios继续运行;
否则重复阶段4、阶段5;
阶段5、PCIe Gen3 Tx Preset初始值调整按如下算法进行:
从默认预设初始值P4开始,先向预设值增大方向设置一次(如:PCIe Gen3 Tx Preset=P5),然后发起PCIe链路再训练;
如果链路训练判断失败,再向预设初始值减小方向进行设置一次(如:PCIe Gen3 Tx Preset=P3),然后发起PCIe链路再训练;
直到两个方向预设值分别达到P0和P9。
由此,通过循环进行自适应调整、循环进行链路训练,来保证链路训练成功。
此外,如果链路训练都失败,不再进行重试,记录日志,向CPLD记录链路训练失败标志,退出该关键PCIe器件链路训练流程。
在一个实施方式中,在S522之后,训练管理方法还包括:
S523在按照预设取值规则中的预设值增大方向和/或预设值减小方向依次遍历发送端链路均衡参数预设值合集中数值、作为新的第k代初始值之后,当所有链路再训练均失败时,记录日志、并将链路训练失败标志写入CPLD寄存器中。
在实际实施例中,在链路训练管理方法的阶段5中,还包括:
如果链路训练都失败,不再进行重试,记录日志,向CPLD记录链路训练失败标志,退出该关键PCIe器件链路训练流程。
在一个实施方式中,训练管理方法还包括链路稳定性检查步骤;链路稳定性检查步骤包括链路活跃度管理步骤,其包括:
S6在判定PCIe链路训练成功之后,判断链路活跃度标志位是否为1;
S61若链路活跃度标志位不为1,则按照预设再训练重试次数依次进行链路再训练;每次链路再训练时,将链路再训练标志位设为1、并按照第二预设时间间隔再次判断链路活跃度标志位是否为1。
在具体实施例中,此外,为保证关键PCIe器件链路训练后链路活跃度以及链路状态符合预期,在链 路训练过程中分别对链路活跃度和链路状态进行检查;
当检查到链路活跃度异常、链路降速或链路降道时,分别发起多次的PCIe链路再训练和PCIe链路失能/使能操作,进一步提高关键PCIe器件链路的稳定性。
在实际实施例中,链路训练管理方法中的链路稳定性检查步骤包括链路活跃度管理步骤,其包括:
阶段6、关键PCIe器件链路训练成功后,进行链路活跃度检查,检查根端口上link_status寄存器(即链路状态寄存器)的链路活跃度标志位是否为1,用来判断根端口与下方设备的连接是否正常。
如果链路活跃度标志位为1,Bios将重试次数及协商结果同时打印到日志、并写入CPLD寄存器中;
如果链路活跃度标志位不为1,则向根端口的link_control寄存器(即链路控制寄存器)的链路再训练标志位上写1,然后等待15ms后检查链路活跃度标志位是否为1;
若链路活跃度不为1,发起三次链路再训练重试。
在一个实施方式中,链路活跃度管理步骤还包括:
S62若链路活跃度标志位为1,则将预设再训练重试次数、链路训练协商结果信息打印到日志、并写入CPLD寄存器中;其中,链路训练协商结果信息包括链路再训练成功时对应的新的第k代初始值。
在实际实施例中,在阶段6的链路活跃度管理步骤中,如果链路活跃度标志位为1,Bios将重试次数及协商结果同时打印到日志、并写入CPLD寄存器中。
在一个实施方式中,在S61之后,链路活跃度管理步骤还包括:
S63当按照预设再训练重试次数依次进行链路再训练后、链路活跃度标志位均不为1时,将预设再训练重试次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
在实际实施例中,阶段6的链路活跃度管理步骤还包括:
若三次重试后链路活跃度标志位均不为1,Bios将重试次数及链路训练失败标志同时打印到日志、并写入CPLD寄存器中,退出该关键PCIe器件链路训练流程。
在一个实施方式中,链路稳定性检查步骤还包括链路状态管理步骤,其包括:
S71当链路活跃度标志位为1时,判断链路状态信息中的链路速度是否小于速度预期值;若小于,则判定发生链路降速;其中,速度预期值与链路能力寄存器中最大链路速度的最小规格相匹配;
S72当链路活跃度标志位为1时,判断链路状态信息中的链路带宽是否小于带宽预期值;若小于,则判定发生链路降道;其中,带宽预期值与链路能力寄存器中最大链路带宽的最小规格相匹配。
在实际实施例中,链路训练管理方法中的链路稳定性检查步骤包括链路状态管理步骤,其包括:
阶段7、关键PCIe器件链路活跃度正常后,进行链路状态检查,主要进行链路速度、链路通道宽度的检查,检查方法为:
检查PCIe设备链路状态中的协商后的带宽及速率是否等于预期值;其中,预期值为PCIe设备所在链路上下游设备的链路能力寄存器中的最大链路速度和最大链路宽度的最小规格;
如果PCIe设备协商后链路速度小于预期值,认为发生链路降速;
如果PCIe设备协商后链路宽度小于预期值,认为发生链路降道。
在一个实施方式中,链路状态管理步骤还包括:
S73当链路状态信息正常时,记录日志、并向CPLD寄存器中写入链路训练成功标志。
在实际实施例中,在阶段7的链路状态管理步骤中,如果link状态检查为正常(例如:协商后的带宽及速率是否等于预期值),记录日志,向CPLD寄存器中写入链路训练成功标志,退出该关键PCIe器件链路训练流程。
在一个实施方式中,链路状态管理步骤还包括:
S81当发生链路降速和/或链路降道时,按照预设失能使能重复次数依次进行链路失能使能操作;每次链路失能使能操作时,设置链路控制寄存器中的失能位、并按照预设操作时间间隔设置失能与使能的时间间隔,按照第二等待时间重新读取链路状态信息,用于判断链路状态是否正常。
在实际实施例中,链路状态管理步骤还包括:
阶段8、当检查出现链路降速或链路降道时,发起3次链路失能、链路使能:
通过设置RootPort配置空间link_control寄存器(即链路控制寄存器)的disable bit(即失能位)实现一次失能使能的过程,设置失能和使能的时间间隔为200ms,等待100ms后重新读取其配置空间链路状态的值;
在一个实施方式中,在S81之后,链路状态管理步骤还包括:
S82当按照预设失能使能重复次数依次进行链路失能使能操作后、每次重试均发生链路降速和/或链路降道时,将预设失能使能重复次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
在实际实施例中,阶段8中的链路状态管理步骤还包括:
若3次链路失能、链路使能重试都出现链路降速或链路降道,Bios将重试次数及链路训练失败标志同时打印到日志、并写入CPLD寄存器中,退出该关键PCIe器件链路训练流程。
在一个实施方式中,在S2之前,训练管理方法还包括:
S1根据服务器主板PCIe信号参数特性、以及服务器主板大规模样本测试要求获取发送端链路均衡参数预设值合集;其中,发送端链路均衡参数预设值合集包括默认预设初始值Px。
在一个实施方式中,在S2之后,训练管理方法还包括:
将默认预设初始值Px作为第k代初始值,对服务器CPU的PCIe根端口进行PCIe链路训练。
在一个实施方式中,在S2之前,训练管理方法还包括:
通过寄存器设置发送端链路均衡参数预设值合集,用于对PCIe器件所在链路对应的CPU根端口进行链路训练。
在实际实施例中,链路训练管理方法包括如下阶段:
阶段1、Bios启动阶段对PCIe发起链路训练,链路训练之前设置板载关键PCIe器件所在链路对应的CPU RootPort(即根端口)的gen3 Tx Preset初始值到寄存器中;
其中,gen3 Tx Preset初始值为硬件根据服务器主板PCIe SI参数特性、并进行大量样本测试获取的预设初始值(如:gen3 Tx Preset=P4)。
阶段2、对应CPU PCIe根端口训练时,使用gen3 Tx Preset初始值进行PCIe链路训练。
在一个实施方式中,S2具体包括:
从发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件所在链路对应的CPU根端口进行链路训练。
在一个实施方式中,S3具体包括:
通过基本输入输出系统固件获取并判断PCIe器件的供应商ID以及设备ID能否被正常读取,用于判断PCIe总线与CPU根端口的PCIe链路训练是否成功。
此外,链路训练管理方法还包括如下阶段:
阶段3、Bios通过检查板载关键PCIe器件的VID(即供应商ID)、DID(即设备ID)是否可以正常读取、来判断该PCIe总线与CPURootPort的PCIe链路训练是否成功。
当可以正常读取到板载关键PCIe器件的VID、DID时,判断链路训练成功,记录日志;bios继续运行。在实际实施例中,训练管理方法还包括:
阶段1、Bios启动阶段对PCIe发起链路训练,链路训练之前设置板载关键PCIe器件所在链路对应的CPU RootPort(即根端口)的gen3 Tx Preset初始值到寄存器中;
其中,gen3 Tx Preset初始值为硬件根据服务器主板PCIe SI参数特性、并进行大量样本测试获取的预设初始值(如:gen3 Tx Preset=P4);
阶段2、对应CPU PCIe根端口训练时,使用gen3 Tx Preset初始值进行PCIe链路训练。
综上,本申请提供的上述PCIe器件链路训练管理方法,具有如下优点:
1)通过bios对启动阶段PCIe链路训练前进行gen3 Tx Preset初值的自适应调整,解决了SI一致性较差的主板关键PCIe器件的启动失败问题。
2)同时,对链路活跃度以及链路状态进行检查;当检查到链路活跃度异常、链路降速或链路降道时,分别发起多次的PCIe链路再训练和PCIe链路失能/使能的操作,进一步提高关键PCIe器件链路的稳定性。
需要注意的是,虽然流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
实施例二:
如图4所示,本申请实施例还提供一种PCIe器件链路训练管理装置,用于通过PCIe均衡技术对服务器主板关键PCIe器件进行链路训练管理,训练管理装置包括链路训练失败修复单元,其包括:
链路训练单元,用于从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对PCIe器件进行链路训练;其中,第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
链路训练判断单元,用于在通过第k代初始值对PCIe器件进行链路训练之后,判断PCIe器件的供应 商ID、设备ID能否被正常读取;
训练失败判定单元,用于供应商ID、设备ID不能被正常读取时,判定PCIe链路训练失败;
链路再训练单元,用于从发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对PCIe器件进行链路再训练;
链路再训练判断单元,用于在对PCIe器件进行链路再训练后,按照第一等待时间判断PCIe器件的供应商ID、设备ID能否被正常读取;
链路再训练成功判定单元,用于进行链路再训练后供应商ID、设备ID能被正常读取时,判定PCIe链路训练成功。
在一个实施方式中,链路训练失败修复单元还包括:
链路再训练失败判定单元,用于若进行链路再训练后PCIe器件的供应商ID、设备ID不能被正常读取,则判定PCIe链路训练失败;
循环链路再训练单元,用于按照预设取值规则中的预设值增大方向和/或预设值减小方向依次从发送端链路均衡参数预设值合集中取值、作为新的第k代初始值,用于分别对PCIe器件进行链路再训练、直至PCIe链路训练成功。
在一个实施方式中,训练管理装置还包括链路稳定性检查单元;链路稳定性检查单元包括链路活跃度管理单元,其包括:
链路活跃度标志位判断单元,用于在判定PCIe链路训练成功之后,判断链路活跃度标志位是否为1;
链路活跃度恢复单元,用于若链路活跃度标志位不为1,则按照预设再训练重试次数依次进行链路再训练;每次链路再训练时,将链路再训练标志位设为1、并按照第二预设时间间隔再次判断链路活跃度标志位是否为1。
在一个实施方式中,训练管理装置还包括链路状态管理单元,其包括:
链路失能使能操作单元,用于当发生链路降速和/或链路降道时,按照预设失能使能重复次数依次进行链路失能使能操作;每次链路失能使能操作时,设置链路控制寄存器中的失能位、并按照预设操作时间间隔设置失能与使能的时间间隔,按照第二等待时间重新读取链路状态信息,用于判断链路状态是否正常。
在一个实施方式中,链路稳定性检查单元还包括链路状态管理单元,其包括:
链路降速判定单元,用于当链路活跃度标志位为1时,判断链路状态信息中的链路速度是否小于速度预期值;若小于,则判定发生链路降速;其中,速度预期值与链路能力寄存器中最大链路速度的最小规格相匹配;
链路降道判定单元,用于当链路活跃度标志位为1时,判断链路状态信息中的链路带宽是否小于带宽预期值;若小于,则判定发生链路降道;其中,带宽预期值与链路能力寄存器中最大链路带宽的最小规格相匹配。
在一个实施方式中,链路再训练成功判定单元还用于:
若链路活跃度标志位为1,则将预设再训练重试次数、链路训练协商结果信息打印到日志、并写入CPLD寄存器中;其中,链路训练协商结果信息包括链路再训练成功时对应的新的第k代初始值。
在一个实施方式中,链路再训练成功判定单元还用于:
当链路状态信息正常时,记录日志、并向CPLD寄存器中写入链路训练成功标志。
在一个实施方式中,链路再训练成功判定单元还用于:
若PCIe器件的供应商ID、设备ID能被正常读取,则判定PCIe链路训练成功、并记录日志。
在一个实施方式中,链路再训练失败判定单元还用于:
当按照预设再训练重试次数依次进行链路再训练后、链路活跃度标志位均不为1时,将预设再训练重试次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
在一个实施方式中,链路再训练失败判定单元还用于:
当按照预设失能使能重复次数依次进行链路失能使能操作后、每次重试均发生链路降速和/或链路降道时,将预设失能使能重复次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
在一个实施方式中,链路再训练失败判定单元还用于:
在按照预设取值规则中的预设值增大方向和/或预设值减小方向依次遍历发送端链路均衡参数预设值合集中数值、作为新的第k代初始值之后,当所有链路再训练均失败时,记录日志、并将链路训练失败标志写入CPLD寄存器中。
在一个实施方式中,训练管理装置还包括:
预设值合集获取单元,用于根据服务器主板PCIe信号参数特性、以及服务器主板大规模样本测试要求获取发送端链路均衡参数预设值合集;其中,发送端链路均衡参数预设值合集包括默认预设初始值Px。
在一个实施方式中,链路训练单元还用于:
将默认预设初始值Px作为第k代初始值,对服务器CPU的PCIe根端口进行PCIe链路训练。
关于上述装置的具体限定,可以参见上文中对于方法的限定,在此不再赘述。
上述装置中的各个模块,可全部或部分通过软件、硬件及其组合来实现。上述各模块可以以硬件形式内嵌于、或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
其中,如图5所示,上述计算机设备可以是终端,其包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
可以理解的是,上述图中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
上述实施例方法中的全部或部分流程的实现,可以通过计算机程序来指令相关的硬件来完成,计算机 程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。
其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
需要注意的是,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其它等效实施例,而本申请的范围由所附的权利要求范围决定。

Claims (20)

  1. 一种PCIe器件链路训练管理方法,其特征在于,用于通过PCIe均衡技术对服务器主板关键PCIe器件进行链路训练管理,所述训练管理方法包括链路训练失败修复步骤,其包括:
    从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对所述PCIe器件进行链路训练;其中,所述第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;所述发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
    在通过所述第k代初始值对所述PCIe器件进行链路训练之后,判断所述PCIe器件的供应商ID、设备ID能否被正常读取;
    响应于不能被正常读取,则判定PCIe链路训练失败;
    从所述发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对所述PCIe器件进行链路再训练;
    在对所述PCIe器件进行链路再训练后,按照第一等待时间再次判断所述PCIe器件的所述供应商ID、所述设备ID能否被正常读取;
    响应于进行链路再训练后所述供应商ID、所述设备ID能被正常读取,则判定PCIe链路训练成功。
  2. 根据权利要求1所述的PCIe器件链路训练管理方法,其特征在于,在按照第一等待时间再次判断所述PCIe器件的所述供应商ID、所述设备ID能否被正常读取之后,所述链路训练失败修复步骤还包括:
    响应于进行链路再训练后所述PCIe器件的供应商ID、设备ID不能被正常读取,则判定PCIe链路训练失败;
    按照所述预设取值规则中的预设值增大方向和/或预设值减小方向依次从所述发送端链路均衡参数预设值合集中取值、作为新的第k代初始值,用于分别对所述PCIe器件进行链路再训练、直至PCIe链路训练成功。
  3. 根据权利要求1或2所述的PCIe器件链路训练管理方法,其特征在于,所述训练管理方法还包括链路稳定性检查步骤;所述链路稳定性检查步骤包括链路活跃度管理步骤,其包括:
    在判定PCIe链路训练成功之后,判断链路活跃度标志位是否为1;
    响应于所述链路活跃度标志位不为1,则按照预设再训练重试次数依次进行链路再训练;每次链路再训练时,将链路再训练标志位设为1、并按照第二预设时间间隔再次判断所述链路活跃度标志位是否为1。
  4. 根据权利要求3所述的PCIe器件链路训练管理方法,其特征在于,所述链路稳定性检查步骤还包括链路状态管理步骤,其包括:
    当所述链路活跃度标志位为1时,判断链路状态信息中的链路速度是否小于速度预期值;响应于链路状态信息中的链路速度小于速度预期值,则判定发生链路降速;其中,所述速度预期值与链路能力寄存器中最大链路速度的最小规格相匹配;
    当所述链路活跃度标志位为1时,判断链路状态信息中的链路带宽是否小于带宽预期值;响应于链路状态信息中的链路带宽小于带宽预期值,则判定发生链路降道;其中,所述带宽预期值与所述链路能力寄存器中最大链路带宽的最小规格相匹配。
  5. 根据权利要求4所述的PCIe器件链路训练管理方法,其特征在于,所述链路状态管理步骤还包括:
    当发生链路降速和/或链路降道时,按照预设失能使能重复次数依次进行链路失能使能操作;每次链路失能使能操作时,设置链路控制寄存器中的失能位、并按照预设操作时间间隔设置失能与使能的时间间隔,按照第二等待时间重新读取所述链路状态信息,用于判断链路状态是否正常。
  6. 根据权利要求3所述的PCIe器件链路训练管理方法,其特征在于,所述链路活跃度管理步骤还包括:响应于所述链路活跃度标志位为1,则将所述预设再训练重试次数、链路训练协商结果信息打印到日志、并写入CPLD寄存器中;其中,所述链路训练协商结果信息包括链路再训练成功时对应的新的第k代初始值。
  7. 根据权利要求4所述的PCIe器件链路训练管理方法,其特征在于,所述链路状态管理步骤还包括:
    当所述链路状态信息正常时,记录日志、并向CPLD寄存器中写入链路训练成功标志。
  8. 根据权利要求1所述的PCIe器件链路训练管理方法,其特征在于,在判断所述PCIe器件的供应商ID、设备ID能否被正常读取之后,所述训练管理方法还包括:
    响应于所述PCIe器件的所述供应商ID、所述设备ID能被正常读取,则判定PCIe链路训练成功、并记录日志。
  9. 根据权利要求3所述的PCIe器件链路训练管理方法,其特征在于,在照预设再训练重试次数依次进行链路再训练之后,所述链路活跃度管理步骤还包括:
    当按照所述预设再训练重试次数依次进行链路再训练后、所述链路活跃度标志位均不为1时,将所述预设再训练重试次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
  10. 根据权利要求5所述的PCIe器件链路训练管理方法,其特征在于,在按照预设失能使能重复次数依次进行链路失能使能操作之后,所述链路状态管理步骤还包括:
    当按照所述预设失能使能重复次数依次进行链路失能使能操作后、每次重试均发生链路降速和/或链路降道时,将所述预设失能使能重复次数与链路训练失败标志打印到日志、并写入CPLD寄存器中。
  11. 根据权利要求2所述的PCIe器件链路训练管理方法,其特征在于,在按照所述预设取值规则中的预设值增大方向和/或预设值减小方向依次从所述发送端链路均衡参数预设值合集中取值、作为新的第k代初始值之后,所述训练管理方法还包括:
    在按照所述预设取值规则中的所述预设值增大方向和/或所述预设值减小方向依次遍历所述发送端链路均衡参数预设值合集中数值、作为新的第k代初始值之后,当所有链路再训练均失败时,记录日志、并将链路训练失败标志写入CPLD寄存器中。
  12. 根据权利要求2所述的PCIe器件链路训练管理方法,其特征在于,在从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值之前,所述训练管理方法还包括:
    根据所述服务器主板PCIe信号参数特性、以及所述服务器主板大规模样本测试要求获取所述发送端链路均衡参数预设值合集;其中,所述发送端链路均衡参数预设值合集包括所述默认预设初始值Px。
  13. 根据权利要求12所述的PCIe器件链路训练管理方法,其特征在于,在从针对第k代PCIe协议设置的 发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值之后,所述训练管理方法还包括:
    将所述默认预设初始值Px作为第k代初始值,对服务器CPU的PCIe根端口进行PCIe链路训练。
  14. 根据权利要求1所述的PCIe器件链路训练管理方法,其特征在于,从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对所述PCIe器件进行链路训练,具体包括:
    从所述发送端链路均衡参数预设值合集中获取所述默认预设初始值Px、作为第k代初始值,用于对所述PCIe器件所在链路对应的CPU根端口进行链路训练。
  15. 根据权利要求14所述的PCIe器件链路训练管理方法,其特征在于,在通过所述第k代初始值对所述PCIe器件进行链路训练之后,判断所述PCIe器件的供应商ID、设备ID能否被正常读取,具体包括:
    通过基本输入输出系统固件获取并判断所述PCIe器件的所述供应商ID以及所述设备ID能否被正常读取,用于判断PCIe总线与所述CPU根端口的PCIe链路训练是否成功。
  16. 根据权利要求15所述的PCIe器件链路训练管理方法,其特征在于,在从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对所述PCIe器件进行链路训练之前,所述训练管理方法还包括:
    通过寄存器设置所述发送端链路均衡参数预设值合集,用于对所述PCIe器件所在链路对应的CPU根端口进行链路训练。
  17. 一种PCIe器件链路训练管理装置,其特征在于,用于通过PCIe均衡技术对服务器主板关键PCIe器件进行链路训练管理,所述训练管理装置包括链路训练失败修复单元,其包括:
    链路训练单元,用于从针对第k代PCIe协议设置的发送端链路均衡参数预设值合集中获取默认预设初始值Px、作为第k代初始值,用于对所述PCIe器件进行链路训练;其中,所述第k代初始值为针对第k代PCIe协议进行均衡调整时发送端链路均衡参数初始值,k不小于2;所述发送端链路均衡参数预设值合集的数据按照数值大小依次排列;
    链路训练判断单元,用于在通过所述第k代初始值对所述PCIe器件进行链路训练之后,判断所述PCIe器件的供应商ID、设备ID能否被正常读取;
    训练失败判定单元,用于所述供应商ID、所述设备ID不能被正常读取时,判定PCIe链路训练失败;
    链路再训练单元,用于从所述发送端链路均衡参数预设值合集中按照预设取值规则获取预设初始值Py、作为新的第k代初始值,用于对所述PCIe器件进行链路再训练;
    链路再训练判断单元,用于在对所述PCIe器件进行链路再训练后,按照第一等待时间判断所述PCIe器件的供应商ID、设备ID能否被正常读取;
    链路再训练成功判定单元,用于进行链路再训练后所述供应商ID、所述设备ID能被正常读取时,判定PCIe链路训练成功。
  18. 一种计算机设备,包括存储器、处理器及计算机程序,所述计算机程序存储在所述存储器上并可在所述处理器上运行,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1-16中任一项所述的PCIe 器件链路训练管理方法的步骤。
  19. 一种非暂态计算机可读存储介质,其存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-16中任一项所述的PCIe器件链路训练管理方法的步骤。
  20. 一种服务器,其特征在于,包括设于主板上的关键PCIe器件,所述PCIe器件通过如权利要求1-16中任一项所述的PCIe器件链路训练管理方法来实现链路训练管理。
PCT/CN2023/121333 2023-01-19 2023-09-26 一种PCIe器件链路训练管理方法、管理装置及服务器 Ceased WO2024152604A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310061710.4 2023-01-19
CN202310061710.4A CN115878540B (zh) 2023-01-19 2023-01-19 一种PCIe器件链路训练管理方法、管理装置及服务器

Publications (1)

Publication Number Publication Date
WO2024152604A1 true WO2024152604A1 (zh) 2024-07-25

Family

ID=85758702

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/121333 Ceased WO2024152604A1 (zh) 2023-01-19 2023-09-26 一种PCIe器件链路训练管理方法、管理装置及服务器

Country Status (2)

Country Link
CN (1) CN115878540B (zh)
WO (1) WO2024152604A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120358141A (zh) * 2025-06-23 2025-07-22 上海芯力基半导体有限公司 一种PCIe链路训练方法及训练系统及通信系统
CN120768749A (zh) * 2025-09-04 2025-10-10 苏州元脑智能科技有限公司 一种网卡故障检测方法、电子设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115878540B (zh) * 2023-01-19 2023-06-13 苏州浪潮智能科技有限公司 一种PCIe器件链路训练管理方法、管理装置及服务器
CN116723084B (zh) * 2023-06-14 2025-12-19 苏州元脑智能科技有限公司 Pcie链路故障修复方法、装置、电子设备及存储介质
CN118012812B (zh) * 2024-04-10 2024-06-18 芯瞳半导体技术(山东)有限公司 Pcie链路训练方法、装置、电子设备及计算机存储介质
CN119513006A (zh) * 2024-11-19 2025-02-25 浪潮商用机器有限公司 一种PCIe链路的性能优化方法、系统、设备及介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377547A (zh) * 2019-06-28 2019-10-25 苏州浪潮智能科技有限公司 PCIE4.0链路中实现redriver参数自适应的方法及装置
CN111538539A (zh) * 2020-04-23 2020-08-14 苏州浪潮智能科技有限公司 存储系统启动方法、装置及计算机可读存储介质
US11226919B1 (en) * 2020-06-23 2022-01-18 Amazon Technologies, Inc. Communication link recovery
CN114416636A (zh) * 2021-12-17 2022-04-29 飞腾信息技术有限公司 一种pcie设备链路速率匹配方法、片上系统和计算机设备
CN114816885A (zh) * 2022-05-27 2022-07-29 苏州浪潮智能科技有限公司 一种自动调整发送端均衡值的方法、装置、设备、介质
CN115048235A (zh) * 2022-06-14 2022-09-13 北京百度网讯科技有限公司 链路参数的配置方法、装置、设备和介质
CN115878540A (zh) * 2023-01-19 2023-03-31 苏州浪潮智能科技有限公司 一种PCIe器件链路训练管理方法、管理装置及服务器

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9325449B2 (en) * 2013-12-06 2016-04-26 Intel Corporation Lane error detection and lane removal mechanism to reduce the probability of data corruption
US9397792B2 (en) * 2013-12-06 2016-07-19 Intel Corporation Efficient link layer retry protocol utilizing implicit acknowledgements
US20170280385A1 (en) * 2016-03-23 2017-09-28 Qualcomm Incorporated Link speed control systems for power optimization
CN115061962B (zh) * 2022-04-28 2023-07-14 苏州浪潮智能科技有限公司 一种外设传输速率管理的方法、系统、存储介质及设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377547A (zh) * 2019-06-28 2019-10-25 苏州浪潮智能科技有限公司 PCIE4.0链路中实现redriver参数自适应的方法及装置
CN111538539A (zh) * 2020-04-23 2020-08-14 苏州浪潮智能科技有限公司 存储系统启动方法、装置及计算机可读存储介质
US11226919B1 (en) * 2020-06-23 2022-01-18 Amazon Technologies, Inc. Communication link recovery
CN114416636A (zh) * 2021-12-17 2022-04-29 飞腾信息技术有限公司 一种pcie设备链路速率匹配方法、片上系统和计算机设备
CN114816885A (zh) * 2022-05-27 2022-07-29 苏州浪潮智能科技有限公司 一种自动调整发送端均衡值的方法、装置、设备、介质
CN115048235A (zh) * 2022-06-14 2022-09-13 北京百度网讯科技有限公司 链路参数的配置方法、装置、设备和介质
CN115878540A (zh) * 2023-01-19 2023-03-31 苏州浪潮智能科技有限公司 一种PCIe器件链路训练管理方法、管理装置及服务器

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120358141A (zh) * 2025-06-23 2025-07-22 上海芯力基半导体有限公司 一种PCIe链路训练方法及训练系统及通信系统
CN120768749A (zh) * 2025-09-04 2025-10-10 苏州元脑智能科技有限公司 一种网卡故障检测方法、电子设备

Also Published As

Publication number Publication date
CN115878540A (zh) 2023-03-31
CN115878540B (zh) 2023-06-13

Similar Documents

Publication Publication Date Title
WO2024152604A1 (zh) 一种PCIe器件链路训练管理方法、管理装置及服务器
CN105975357B (zh) 一种定位故障的方法和系统
CN114116337A (zh) 基于pcie链路配置的硬盘测试方法、系统、终端及存储介质
JP2010140127A (ja) データ転送処理装置及び方法
CN111782446B (zh) Ssd正常掉电的测试方法、装置、计算机设备及存储介质
CN114201360B (zh) 一种aer功能管理方法、装置、服务器和存储介质
CN115033441A (zh) PCIe设备故障检测方法、装置、设备和存储介质
CN104317690A (zh) 一种基于ITP工具的Memory Demand Scrub测试方法
CN114741350A (zh) 一种多个nvme硬盘背板级联方法、系统、设备及介质
CN116303034A (zh) 一种片上网络的自动测试系统、方法、设备及介质
CN118643000B (zh) 服务器PCIe端口的配置信息表的生成方法、发送方法和装置
CN117093427A (zh) 一种pcie设备状态检测方法、系统、电子设备及介质
CN102662808A (zh) 一种pcie硬件故障检测的实现方法与装置
WO2024124862A1 (zh) 基于服务器的内存处理方法和装置、处理器及电子设备
CN104391753A (zh) 一种服务器主板内存系统无故障运行方法
CN111008102A (zh) Fpga加速卡高速接口si测试控制装置、系统及方法
US20230129200A1 (en) System, apparatus and methods for offloading debug operations from host to peer
CN114741339B (zh) 一种pcie带宽重训练的方法、装置、设备、存储介质
CN116680101A (zh) 一种操作系统宕机检测方法及装置、消除方法及装置
CN110377484A (zh) 判断硬盘状态的方法及系统
CN113671360B (zh) I2c接口器件测试方法、装置及i2c接口器件
US20130326106A1 (en) Methods and structure for accounting for connection resets between peripheral component interconnect express bridges and host devices
CN115757099B (zh) 平台固件保护恢复功能自动测试方法和装置
CN117762710A (zh) 内存参数优化方法、装置、电子设备及可读存储介质
CN117033055A (zh) 命令解析异常检测方法、装置及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23917072

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23917072

Country of ref document: EP

Kind code of ref document: A1