Server bus device hot-plug control method, device and electronic device
By detecting and controlling the startup phase of the server bus device and adjusting the preset time during the hot plug process, the problem of conflicting protocol requirements is solved and the startup success rate of the device is improved.
Patent Information
- Application Number
- CN202410862501.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-28
AI Technical Summary
During the hot insertion process of the server bus device, due to the conflict between the requirements of the second protocol (such as OCP3.0 protocol) and the first protocol (such as PCIE protocol) on the power-on to reset release time, the bus device fails to power on and the startup success rate lower.
By detecting the startup operation of the bus device, controlling it to enter the target startup phase, and executing other startup phases after the preset time interval configured, the protocol execution process is adjusted to meet the time requirements of the second protocol, while shortening the data link establishment time. Avoid conflict.
The startup success rate of the bus device is improved, ensuring that the protocol execution time meets the requirements of the second protocol, while meeting the data link establishment time of the first protocol, and solving the problem of startup failure.
Smart Images

Figure CN118394697B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of bus devices, and in particular, to a method, device and electronic device for hot-plugging control of server bus devices. Background Art
[0002] The peripheral devices of the server can be flexibly configured to achieve different functions, such as the OCP card in the bus device. The hot plugging of the OCP card needs to be implemented by notification hot plugging. The OCP card is inserted into the running server system. In the related technology, the CPLD needs to power on the OCP card and release the reset according to the second protocol (for example, the OCP3.0 protocol). After the OS and the OCP card complete the establishment of a data link (for example, a PCIE connection) that complies with the first protocol (for example, the PCIE protocol), the hot plugging of the OCP card is completed.
[0003] In this process, the second protocol (e.g., OCP3.0 protocol) and the first protocol (e.g., PCIE protocol) have conflicting requirements for the time between power-on and reset release of the bus device (e.g., OCP card). The second protocol (e.g., OCP3.0 protocol) requires that the time from power-on of the OCP card to reset release should be greater than 1S, while the first protocol (e.g., PCIE protocol) requires that the time from power-on to connection establishment (reset release) of the PCIE device should be less than 1S. This will cause the bus device to fail to power on. Summary of the invention
[0004] The embodiments of the present application provide a server bus device hot-plug control method, device and electronic device to at least solve the problem of low success rate of starting bus devices in the related art.
[0005] According to one embodiment of the present application, a method for hot-plugging control of a server bus device is provided, wherein the server includes a processor and a controller, the controller is connected to the processor, the processor is used to interact with the bus device connected to the server through a data link that conforms to a first protocol, and the method is applied to the controller, the method comprising: detecting a startup operation triggered on the bus device; in the case of detecting that the startup operation is triggered on the bus device, controlling the bus device to enter a target startup phase in the startup phase included in a device startup process, wherein the target startup phase is the starting phase of a protocol execution process of the bus device having a second protocol, and the second protocol is different from the first protocol; after a first preset time length configured by an interval, controlling the bus device to execute other startup phases in the device startup process except the target startup phase.
[0006] In an exemplary embodiment, the server further includes a start trigger component, the start trigger component is connected to the controller, and the detecting the start operation triggered on the bus device includes: detecting whether the start trigger component has been triggered; and in the case where it is detected that the start trigger component has been triggered, determining that the start operation has been triggered on the bus device.
[0007] In an exemplary embodiment, a register is also deployed in the controller, and the register is used to store information on whether a trigger operation has been executed on the start trigger component. After controlling the bus device to enter a target startup phase in the startup phase included in the device startup process, the method further includes: extracting target information of the start trigger component, wherein the target information is used to indicate that the trigger operation has been executed on the start trigger component; and storing the target information in the register.
[0008] In an exemplary embodiment, the bus device is connected to the device interface on the server, and after a first preset time length of the interval configuration, the bus device is controlled to execute other startup phases in the device startup process except the target startup phase, including: when the device startup process includes N startup phases, by executing the following steps, after the first preset time length of the interval configuration, the bus device is controlled to execute N-1 startup phases in the N startup phases except the target startup phase, wherein N is a positive integer greater than or equal to 2:
[0009] Extract M preset durations between the configured N startup phases, where M is a positive integer; determine the preset duration between the target startup phase and the first startup phase among the N-1 startup phases and the preset duration between adjacent startup phases among the N-1 startup phases based on the M preset durations, and obtain a reference preset duration; control the bus device to execute N-1 startup phases among the N startup phases except the target startup phase according to the reference preset duration.
[0010] In an exemplary embodiment, the preset duration between the target startup phase and the first startup phase in the N-1 startup phases and the preset duration between adjacent startup phases in the N-1 startup phases are determined according to the M preset durations to obtain a reference preset duration, including: determining the i-th preset duration between the start of the i-th startup phase in the N-1 startup phases and the start of the i+1-th startup phase by executing the following steps, wherein i is a positive integer less than or equal to N-1, and the reference preset duration includes the i-th preset duration: Extract the i-th preset duration; or, extract the i2-1-th preset duration and the i1-1-th preset duration from the preset durations other than the first preset duration among the M preset durations, wherein the i1-1-th preset duration is the preset duration between the start of the i-1-th startup phase in the N-1 startup phases and the start of the i-th startup phase, and the i2-1-th preset duration is the preset duration between the i-1-th startup phase in the N-1 startup phases and the i+1-th startup phase, and determine the i-th preset duration based on the i2-1-th preset duration and the i1-1-th preset duration, wherein i1 equals i2 equals i.
[0011] In an exemplary embodiment, determining the i-th preset duration based on the i2-1-th preset duration and the i1-1-th preset duration includes: determining the i-th preset duration as a value obtained by subtracting the i1-1-th preset duration from the i2-1-th preset duration.
[0012] In an exemplary embodiment, the controlling the bus device to execute N-1 startup stages among the N startup stages except the target startup stage according to the reference preset time length includes: when controlling the bus device to start executing the target startup stage, controlling the bus device to start executing the first startup stage after an interval of the first preset time length among the N-1 preset time lengths, wherein the reference preset time length includes the N-1 preset time lengths; when controlling the bus device to start executing the first startup stage, controlling the bus device to execute corresponding startup stages among the N-1 startup stages except the first startup stage according to N-2 preset time lengths, wherein the N-2 preset time lengths are preset time lengths among the reference preset time lengths except the preset time length between the target startup stage and the first startup stage.
[0013] In an exemplary embodiment, the server also includes a start trigger component, which is connected to the controller. A register is also deployed in the controller, and the register stores target information for indicating that the start trigger component has been triggered. When controlling the bus device to start executing the target startup phase, the first preset time length among N-1 preset time lengths is interval to control the bus device to start executing the first startup phase, including: when controlling the bus device to start executing the target startup phase and the first startup phase includes an information reading phase, the first preset time length is interval, and a target read instruction is generated and sent to the processor, wherein the target read instruction is used to instruct the processor to read the information stored in the register from the register, and the processor is configured to read the information stored in the register in response to the received target read instruction.
[0014] In an exemplary embodiment, the method of controlling the bus device to execute a corresponding startup phase in the N-1 startup phases except the first startup phase according to the N-2 preset durations includes: by executing the following steps, according to the s-1th preset duration in the N-2 preset durations, controlling the bus device to execute the sth startup phase in the startup phases except the first startup phase in the N-1 startup phases, and according to the sth preset duration in the N-2 preset durations, controlling the bus device to execute the s+1th startup phase in the startup phases except the first startup phase in the N-1 startup phases, wherein the s-1th preset duration is The duration is the preset duration between the start of the s-1th startup phase and the start of the sth startup phase, the sth preset duration is the preset duration between the start of the sth startup phase and the start of the s+1th startup phase, s is a positive integer less than or equal to N-2 and greater than 1: when the bus device is controlled to start executing the s-1th startup phase, the bus device is controlled to start executing the s-1th preset duration; when the bus device is controlled to start executing the sth startup phase, the bus device is controlled to start executing the s+1th startup phase after an interval of the s-1th preset duration.
[0015] In an exemplary embodiment, a register is further disposed in the controller, and the register stores target information for indicating that a trigger operation has been executed on the start trigger component. When controlling the bus device to start executing the s-1th startup phase, the s-1th preset time length is interval, and the bus device is started to start executing the s-1th startup phase, including: when the s-1th startup phase includes an information reading phase, the s-1th startup phase includes a signal receiving phase, and when controlling the bus device to start executing the s-1th startup phase, the s-1th preset time length is interval, and a target signal sent by the processor is received, wherein the processor is configured to generate and send the target signal to the controller when the target information is read from the register.
[0016] In an exemplary embodiment, when controlling the bus device to start executing the sth startup phase, the sth preset time length is interval, and the bus device is controlled to start executing the s+1th startup phase, including: when the sth startup phase includes a signal receiving phase and the s+1th startup phase includes a de-reset phase, when controlling the bus device to start executing the signal receiving phase, the de-reset operation is performed on the bus device at an interval of the sth preset time length.
[0017] In an exemplary embodiment, after controlling the bus device to start executing the s+1th startup phase, the method further includes: when controlling the bus device to start executing the s+1th startup phase and the s+2th startup phase includes a data link establishment phase, generating and sending a data link establishment instruction to the processor at an interval of the s+1th preset time length among the N-2 preset time lengths, wherein the data link establishment instruction is used to instruct the processor to establish a target data link between the processor and the bus device that complies with the first protocol; receiving a data link establishment result returned by the processor, wherein the processor is configured to establish the target data link between the processor and the bus device that complies with the first protocol in response to the received data link establishment instruction.
[0018] In an exemplary embodiment, a device interface is deployed on the server, the device interface is connected to the bus device, and a storage space is deployed in the server. Before detecting the startup operation triggered on the bus device, the method also includes: configuring a preset duration of the interval between startup stages included in the device startup process of the bus device of the device interface according to the protocol execution process and the data link establishment process; and recording the preset duration of the interval between the startup stages included in the device startup process of a device interface having a corresponding relationship and the bus device of the device interface in the storage space.
[0019] In an exemplary embodiment, configuring the preset duration of the interval between the startup stages included in the device startup process of the bus device of the device interface according to the protocol execution process and the data link establishment process includes: when the device startup process of the bus device of the device interface includes N startup stages, and the preset duration of the interval between the N startup stages includes M preset durations, configuring the M preset durations according to the protocol execution time and the establishment time by performing the following steps, wherein N is a positive integer greater than or equal to 2, and M is a positive integer: screening a t-th preset duration from the M preset durations, and configuring the t-th preset duration, wherein the t-th preset duration is the duration of the interval between the start of execution of a first reference startup stage among the N startup stages and the start of execution of a second reference startup stage among the N startup stages, the protocol execution process and the data link establishment process both include the first reference startup stage and the second reference startup stage, and t is a positive integer less than or equal to N; configuring the preset durations of the M preset durations except the t-th preset duration according to the t-th preset duration.
[0020] In an exemplary embodiment, configuring the preset durations among the M preset durations except the tth preset duration according to the tth preset duration includes: configuring K preset durations among the M preset durations except the tth preset duration by executing the following steps, wherein the K preset durations are preset durations for determining the execution time of the protocol, and K is a positive integer less than or equal to M: subtracting the tth preset duration from the second preset duration to obtain a first difference preset duration; configuring each of the K preset durations according to the first difference preset duration, wherein the sum of the K preset durations is equal to the first difference preset duration.
[0021] In an exemplary embodiment, configuring each of the K preset durations according to the first difference preset duration, wherein the sum of the K preset durations is equal to the first difference preset duration, includes: configuring each of the K preset durations according to Q first difference preset durations by executing the following steps, wherein the qth first difference preset duration among the Q first difference preset durations is obtained by subtracting the qth preset duration configured Q times from the second preset duration, Q is a positive integer greater than or equal to 2, and q is a positive integer less than or equal to Q: performing an averaging operation on the Q first difference preset durations to obtain an average difference preset duration; configuring each of the K preset durations according to the average difference preset duration, wherein the sum of the K preset durations is equal to the average difference preset duration.
[0022] In an exemplary embodiment, configuring the preset durations among the M preset durations except the tth preset duration according to the tth preset duration includes: configuring P preset durations among the M preset durations except the tth preset duration by executing the following steps, wherein the M preset durations include the tth preset duration, the P preset durations and K preset durations, P is a positive integer less than or equal to M, and the P preset durations are preset durations for determining the establishment time: subtracting the tth preset duration from the second preset duration to obtain a second difference preset duration; and configuring each of the P preset durations according to the second difference preset duration.
[0023] In an exemplary embodiment, before configuring the preset durations other than the tth preset duration among the M preset durations according to the tth preset duration, the method further includes: detecting the duration difference between the protocol execution time and the establishment time; performing a sum operation on a target product and the duration difference to obtain a sum duration, wherein the target product is a value obtained by performing a product operation on the duration difference and a target ratio; and configuring a second preset duration as the sum duration.
[0024] According to another embodiment of the present application, a server PCle device hot insertion control method is provided, including: a processor, a programmable logic controller connected to the processor, and used to: detect a hot insertion trigger signal of the PCle device; after receiving the hot insertion trigger signal of the PCle device, the programmable logic controller controls the PCle device to power on and starts a first preset time delay; after the first preset time delay is completed, the processor starts the driver loading of the PCle device according to the read hot insertion trigger signal; after the driver loading of the PCle device is completed, the processor sends a power enable signal to the programmable logic controller, and the programmable logic controller establishes a high-speed connection between the PCle device and the processor according to the power enable signal to realize the hot insertion of the PCle device.
[0025] According to another embodiment of the present application, a server bus device hot-plug control device is provided, the device comprising: a server comprising a processor and a controller, the controller being connected to the processor, the processor being used to interact with a bus device connected to the server via a data link conforming to a first protocol, the device being applied to the controller, the device comprising: a first detection module, being used to detect a startup operation triggered on the bus device; a first control module, being used to control the bus device to enter a target startup phase in a startup phase included in a device startup process when it is detected that the bus device is triggered by the startup operation, wherein the target startup phase is the start phase of a protocol execution process of the bus device having a second protocol, the second protocol being different from the first protocol; a second control module, being used to control the bus device to execute other startup phases in the device startup process except the target startup phase after a first preset time length configured by an interval.
[0026] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0027] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0028] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0029] Through the present application, when it is detected that the bus device has been triggered to start the operation, the bus device is directly controlled to enter the starting stage of the startup phase, the timing of the protocol execution process is started, and then the bus device is controlled to execute other startup phases except the starting stage in the startup phase according to the preset duration of the interval between the startup phases included in the device startup process of the configured bus device. In this way, the time of the protocol execution process is lengthened, and the time for establishing the data link is shortened, so that the protocol execution time satisfies the second protocol supported by the bus device, and the time for establishing the data link also satisfies the first protocol, thereby avoiding the startup failure of the bus device due to the conflict between the time of executing the startup phase and the time of establishing the data link. Therefore, the problem of low success rate of the startup of the bus device can be solved, and the effect of improving the success rate of the startup of the bus device can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a hardware structure block diagram of a server device of a server bus device hot plugging control method according to an embodiment of the present application;
[0031] Figure 2 is a flow chart of a server bus device hot-plug control method according to an embodiment of the present application;
[0032] Figure 3 Schematic diagram of an optional server bus device hot plug control framework according to an embodiment of the present application Figure 1 ;
[0033] Figure 4 is a schematic diagram of an optional detection of whether to trigger a start operation according to an embodiment of the present application;
[0034] Figure 5 is a schematic diagram of an optional method of storing information in a register according to an embodiment of the present application;
[0035] Figure 6 is a schematic diagram of hot insertion of an optional bus device according to an embodiment of the present application;
[0036] Figure 7 Schematic diagram of an optional server bus device hot plug control framework according to an embodiment of the present application Figure 2 ;
[0037] Figure 8 is a schematic diagram of hot insertion of a bus device in an optional related technology implemented according to the present application;
[0038] Fig. 9 It is a structural block diagram of a server bus device hot-plug control device according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0041] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a server bus device hot plug control method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0042] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the server bus device hot plug control method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0043] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] First, the terms involved in the embodiments of the present application are explained as follows:
[0045] CPLD: Complex Programmable Logic Device, complex programmable logic device.
[0046] OCP: Open Compute Project, open computing platform, OCP card refers to a specific network card, which is essentially a PCIE device. One of its main features is support for notification hot plugging.
[0047] PCIE: peripheral component interconnect express, a high-speed serial computer expansion bus standard.
[0048] CPU: Central Processing Unit, which is the core component for the normal operation of the server.
[0049] OS:Operating System, operating system.
[0050] UFM: User Flash Memory, a Flash area built into the CPLD. The data stored in this area will not be lost when the CPLD is powered off.
[0051] In this embodiment, a server bus device hot-plug control method is provided. The server includes a processor and a controller. The controller is connected to the processor. The processor is used to interact with the bus device connected to the server through a data link that complies with a first protocol. The method is applied to the controller. Figure 2 is a flow chart of a server bus device hot plugging control method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0052] Step S202, detecting a start operation triggered on the bus device;
[0053] Step S204, in the case of detecting that the bus device is triggered to perform the startup operation, controlling the bus device to enter a target startup phase in the startup phase included in the device startup process, wherein the target startup phase is a starting phase of a protocol execution process of the bus device having a second protocol, and the second protocol is different from the first protocol;
[0054] Step S206: After a first preset time period configured in interval, control the bus device to execute other startup phases except the target startup phase in the device startup process.
[0055] Through the above steps, when it is detected that the bus device has been triggered to start the operation, the bus device is directly controlled to enter the starting stage of the startup phase, the timing of the protocol execution process is started, and then the bus device is controlled to execute other startup phases except the starting stage in the startup phase according to the preset duration of the interval between the startup phases included in the device startup process of the configured bus device. In this way, the time of the protocol execution process is lengthened, and the time for establishing the data link is shortened, so that the protocol execution time satisfies the second protocol supported by the bus device, and the time for establishing the data link satisfies the first protocol, thereby avoiding the failure of the bus device to start up due to the conflict between the time of executing the startup phase and the time of establishing the data link. Therefore, the problem of low success rate of the startup of the bus device can be solved, thereby achieving the effect of improving the success rate of the startup of the bus device.
[0056] Figure 3 Schematic diagram of an optional server bus device hot plug control framework according to an embodiment of the present application Figure 1 ,like Figure 3 As shown, a mainboard is deployed in the server, and a processor (e.g., CPU), a controller (e.g., CPLD), a bus device (e.g., OCP card), a start trigger component (e.g., Hotplug Button), and device interface 1 to device interface 3 are deployed in the server. The OCP card can be connected to device interface 2 but is not limited to it.
[0057] A storage space is also deployed in the server, and a controller (e.g., CPLD) is also connected to the processor and the storage space. The storage space stores preset durations between startup phases included in the device startup process of the bus device configured for each device interface (e.g., preset duration 1 between startup phases included in the device startup process of the bus device configured for device interface 1, preset duration 2 between startup phases included in the device startup process of the bus device configured for device interface 2, and preset durations between startup phases included in the device startup process of the bus device configured for device interface 3).
[0058] Figure 7 Schematic diagram of an optional server bus device hot plug control framework according to an embodiment of the present application Figure 2 , Figure 8 is a schematic diagram of hot insertion of a bus device in an optional related technology implemented according to the present application, combined with Figure 7 and Figure 8 As shown, a processor (eg, a CPU (Central Processing Unit)) and a programmable logic controller (eg, a CPLD (Complex Programmable Logic Device)) and an OCP card are deployed on the server. The OCP card and the CPU can communicate via, but are not limited to, a BUS bus.
[0059] In the related art, when an OCP card is inserted into a running server system, it will not be powered on actively. At this time, the HotplugButton is pressed, and the OS reads the IO (Input / Output) Expander (expansion interface) (or CPLD) through I2C (Inter-Integrated Circuit) to receive the Hotplug signal, and controls the Power (power) LED (light-emitting diode) from off to flashing through the IO Expander (or CPLD) through I2C, and controls the Power EN signal to become valid; at the same time, the OS will also communicate with the OCP card through the PCIE high-speed link to try to establish a connection; after detecting that the OCP card is in place, the CPLD will power on the OCP card and release the reset according to the Power EN signal, but not limited to the OCP3.0 protocol. After the OS and the OCP card complete the PCIE connection establishment, the OS controls the Power LED state to change from flashing to always on, and the hot insertion of the OCP card is completed.
[0060] In the related art, during the hot insertion of the OCP card, an abnormal log "Failed to check link status" will appear in the OS; secondly, during the hot insertion of the OCP card, another warning light controlled by the OS through I2C will light up for about 1 second and then go out. It is understandable that in the related art, the hot insertion of the OCP card will cause abnormalities.
[0061] In the embodiment of the present application, the bus device (for example, OCP card) is powered on in advance, and the hot insertion of the bus device in the embodiment of the present application can be achieved by but not limited to the following methods: the programmable logic controller is used to detect the hot insertion trigger signal of the PClE device (for example, Hotplug Button); after receiving the hot insertion trigger signal of the PClE device, the programmable logic controller controls the PClE device to power on and start the first preset time delay, and the processor starts the driver loading of the PCIe device according to the read hot insertion trigger signal after the first preset time delay is completed; the processor sends a PowerEN control signal to the programmable logic controller after the driver loading of the PClE device is completed, and the programmable logic controller controls the connection according to the Power EN to achieve hot insertion of the PClE device.
[0062] In the technical solution provided in the above step S202, the processor can be but is not limited to being used to interact with bus devices connected to each device interface through a data link that conforms to the first protocol. For example, the first protocol can be but is not limited to including the PCIE protocol, and the second protocol can be but is not limited to including the OCP protocol, etc. This application does not impose any restrictions on this.
[0063] Optionally, in this embodiment, the protocol execution time of the second protocol supported by the bus device is greater than the establishment time of the data link, and the storage space stores the preset duration between the startup phases included in the device startup process of the bus device configured for each device interface.
[0064] Optionally, in this embodiment, when different bus devices are connected to the same device interface on the server, the preset durations between the startup phases included in the device startup processes of the corresponding bus devices may be, but are not limited to, the same.
[0065] Optionally, in this embodiment, the preset time lengths between the startup stages included in the device startup process of the bus device configured for each device interface stored in the storage space may include but are not limited to the preset time lengths between adjacent startup stages, or the preset time lengths between two startup stages separated by at least one startup stage.
[0066] Optionally, in this embodiment, the bus device (e.g., OCP card) may, but is not limited to, support hot swap (HotSwap), that is, plugging and unplugging with power on. For example, hot plugging may, but is not limited to, be used to indicate that the bus device (e.g., OCP card) is inserted into a running server system. When the bus device (e.g., OCP card) is powered on and a PCIE high-speed connection (equivalent to a data link) between the server's processor or operating system and the bus device (e.g., OCP card) is established, the hot plugging process of the bus device (e.g., OCP card) is completed; hot unplugging may, but is not limited to, include first notifying the driver to uninstall the driver. When the driver unloading is completed, the server's processor or operating system terminates the PCIE high-speed connection for communicating with the OCP card, and the controller (e.g., CPLD) powers off the OCP card. After that, the unplugging operation can be performed, and the hot unplugging process of the bus device (e.g., OCP card) is completed.
[0067] In an exemplary embodiment, the server further includes a start trigger component, the start trigger component is connected to the controller, and the detecting the start operation triggered on the bus device includes: detecting whether the start trigger component has been triggered; and in the case where it is detected that the start trigger component has been triggered, determining that the start operation has been triggered on the bus device.
[0068] Optionally, in this embodiment, the server also includes a start trigger component. For example, the start trigger component may be but is not limited to a button deployed on the server. When it is detected that the start trigger component has not been triggered, it is determined that no start operation is detected to be triggered on the bus device.
[0069] Figure 4 is a schematic diagram of an optional detection of whether to trigger a start operation according to an embodiment of the present application, such as Figure 4 As shown, a controller and a start trigger component are deployed in the server. In this case, it is possible but not limited to detecting whether a trigger operation has been executed on the start trigger component; in the case where it is detected that a trigger operation has been executed on the start trigger component, it is determined that a start operation has been triggered on the bus device. In this case, it is possible but not limited to controlling the bus device to enter the target startup phase.
[0070] In the technical solution provided in the above step S204, the bus device supports the second protocol. Only when the protocol execution process is completed can the bus device use the functions supported by the second protocol. It can be understood that the protocol execution process is a process of executing the operations included in the second protocol supported by the bus device. For example, when the second protocol includes the OCP protocol, the protocol execution process may include, but is not limited to, a process from CPLD controlling OCP power-on to CPLD controlling OCP de-reset.
[0071] Optionally, in this embodiment, the protocol execution processes corresponding to different second protocols may be but are not limited to being different. It can be understood that the starting stages of the protocol execution processes corresponding to different second protocols may be but are not limited to being different. For example, when the second protocol includes the OCP protocol, the target startup stage may be but is not limited to including the stage of powering on the bus device.
[0072] In an exemplary embodiment, a register is also deployed in the controller, and the register is used to store information on whether a trigger operation has been executed on the start trigger component. After controlling the bus device to enter a target startup phase in the startup phase included in the device startup process, the above method also includes: extracting target information of the start trigger component, wherein the target information is used to indicate that the trigger operation has been executed on the start trigger component; and storing the target information in the register.
[0073] Optionally, in this embodiment, when it is detected that the trigger operation has not been executed on the start trigger component, it can be determined that the start operation has not been detected to be executed on the bus device. In such a case, reference information of the start trigger component can be extracted but is not limited to, wherein the reference information is used to indicate that the trigger operation has not been executed on the start trigger component; and the reference information is stored in a register.
[0074] Figure 5 is a schematic diagram of an optional method of storing information in a register according to an embodiment of the present application, such as Figure 5 As shown, a controller and a start trigger component are deployed in the server, and the controller and the start trigger component are connected. When it is detected that a trigger operation has been performed on the start trigger component, target information for indicating that a trigger operation has been performed on the start trigger component can be stored in a register but is not limited to.
[0075] In the technical solution provided in the above step S206, it is possible but not limited to that when the bus device is controlled to start entering the target startup phase in the startup phase included in the device startup process, after a first preset time interval, the bus device is controlled to execute other startup phases except the target startup phase.
[0076] In this way, the conflict between the protocol execution time and the data link establishment time is avoided, so that the protocol execution time meets the requirements of the second protocol and the data link establishment time meets the requirements of the first protocol, thereby improving the compatibility of the bus device with the second protocol and the first protocol.
[0077] In an exemplary embodiment, the bus device is connected to a device interface on the server, and after a first preset time length configured by an interval, the bus device can be controlled to execute other startup stages in the device startup process except the target startup stage in the following manner, but is not limited to: when the device startup process includes N startup stages, by executing the following steps, after the first preset time length configured by the interval, the bus device is controlled to execute N-1 startup stages in the N startup stages except the target startup stage, wherein N is a positive integer greater than or equal to 2: extracting M preset time lengths between the configured N startup stages, where M is a positive integer; determining, based on the M preset time lengths, the preset time length of the interval between the target startup stage and the first startup stage in the N-1 startup stages and the preset time length between adjacent startup stages in the N-1 startup stages to obtain a reference preset time length; and controlling the bus device to execute N-1 startup stages in the N startup stages except the target startup stage according to the reference preset time length.
[0078] Optionally, in this embodiment, the preset duration between two adjacent startup stages in N startup stages can also be determined in the following manner but is not limited to: based on the M preset durations, determine the preset duration of the interval between the target startup stage and the first startup stage in N-1 startup stages, and based on the M preset durations, determine the preset duration between other adjacent startup stages in the N-1 startup stages except the first startup stage.
[0079] In an exemplary embodiment, the i-th preset duration between the start of the i-th startup phase in the N-1 startup phases and the start of the i+1-th startup phase can be determined by performing the following steps, but is not limited to the M preset durations, wherein i is a positive integer less than or equal to N-1, and the reference preset duration includes the i-th preset duration: extracting the i-th preset duration from the preset durations other than the first preset duration in the M preset durations; or extracting the i-th preset duration from the preset durations other than the first preset duration in the M preset durations. Take the i2-1th preset duration and the i1-1th preset duration, wherein the i1-1th preset duration is the preset duration between the start of the i-1th startup stage in the N-1 startup stages and the start of the i-th startup stage, and the i2-1th preset duration is the preset duration between the i-1th startup stage and the i+1th startup stage in the N-1 startup stages. Determine the i-th preset duration based on the i2-1th preset duration and the i1-1th preset duration, wherein i1 equals i2 equals i.
[0080] Optionally, in this embodiment, the i-th preset duration can also be determined in the following manner but is not limited to: extract the j1-th preset duration and the j2-th preset duration from the M preset durations, wherein the j1-th preset duration is the preset duration between the j-th startup stage and the i-th startup stage in the N-1 startup stages, j is a positive integer less than i, and the difference between i and j is greater than or equal to 2, the j2-th preset duration is the preset duration between the j-th startup stage and the i+1-th startup stage in the N-1 startup stages, and the i-th preset duration is determined based on the j-th preset duration and the i-th preset duration, and j1 equals j2 equals j.
[0081] In this way, the preset duration is determined according to the preset duration between two startup phases separated by at least one startup phase, thereby improving the flexibility of determining the preset duration of the startup phase.
[0082] In an exemplary embodiment, the i-th preset duration can be determined based on the i2-1-th preset duration and the i1-1-th preset duration in the following manner but not limited to: the i-th preset duration is determined as the preset duration obtained by subtracting the i1-1-th preset duration from the i2-1-th preset duration.
[0083] Optionally, in this embodiment, the i-th preset duration may also be determined in the following manner but is not limited to: the i-th preset duration is determined as the preset duration obtained by subtracting the j1-th preset duration from the j2-th preset duration.
[0084] In an exemplary embodiment, the bus device may be controlled to execute N-1 startup phases among the N startup phases except the target startup phase according to the reference preset time length in the following manner, but is not limited to: when the bus device is controlled to start executing the target startup phase, the bus device is controlled to start executing the first startup phase after a first preset time length among the N-1 preset time lengths, wherein the reference preset time length includes the N-1 preset time lengths; when the bus device is controlled to start executing the first startup phase, the bus device is controlled to execute corresponding startup phases among the N-1 startup phases except the first startup phase according to N-2 preset time lengths, wherein the N-2 preset time lengths are preset time lengths among the reference preset time lengths except the preset time length between the target startup phase and the first startup phase.
[0085] Optionally, in this embodiment, it is possible but not limited to first controlling the bus device to start executing the target startup phase, and then controlling the bus device to execute the remaining startup phases in the startup process according to the preset time length between adjacent startup phases.
[0086] In an exemplary embodiment, the server also includes a start trigger component, which is connected to the controller. A register is also deployed in the controller, and the register stores target information for indicating that the start trigger component has been triggered. The server can control the bus device to start executing the first start phase at an interval of the first preset time length among N-1 preset time lengths in the following manner, but is not limited to: when the bus device is controlled to start executing the target start phase and the first start phase includes an information reading phase, generate and send a target read instruction to the processor at an interval of the first preset time length, wherein the target read instruction is used to instruct the processor to read the information stored in the register from the register, and the processor is configured to read the information stored in the register in response to the received target read instruction.
[0087] Optionally, in this embodiment, the processor and the register are connected, and the above method also includes: the processor responds to the received target read instruction, reads the information stored in the register, parses the read information to determine whether it is used to indicate that the start trigger component has been triggered, and if it is parsed that the read information is used to indicate that the start trigger component has been triggered, generates a target signal and sends the target signal to the controller.
[0088] In an exemplary embodiment, the following steps may be performed, but are not limited to, according to the s-1th preset time length among the N-2 preset time lengths, to control the bus device to execute the s-th startup phase among the startup phases other than the first startup phase among the N-1 startup phases, and according to the s-1th preset time length among the N-2 preset time lengths, to control the bus device to execute the s+1th startup phase among the startup phases other than the first startup phase among the N-1 startup phases, wherein the s-1th preset time length is the time between starting to execute the s-1th startup phase and starting to execute the s-1th startup phase. The preset time length between the startup phases, the sth preset time length is the preset time length between the start of the sth startup phase and the start of the s+1th startup phase, s is a positive integer less than or equal to N-2 and greater than 1: when the bus device is controlled to start executing the s-1th startup phase, the bus device is controlled to start executing the s-1th preset time length; when the bus device is controlled to start executing the sth startup phase, the bus device is controlled to start executing the s+1th startup phase after an interval of the sth preset time length.
[0089] Optionally, in this embodiment, the preset duration of the interval between the startup stages may be, but is not limited to, the duration of the interval between indicating that the control bus device starts to execute the previous startup stage in the startup process and the control bus device starts to execute the next startup stage of the previous startup stage in the startup process. For example, the preset duration between startup stage 1 and startup stage 2 may be, but is not limited to, the duration of the interval between indicating that the control bus device starts to execute startup stage 1 and the control bus device starts to execute startup stage 2.
[0090] In an exemplary embodiment, a register is also disposed in the controller, and the register stores target information for indicating that a trigger operation has been executed on the start trigger component. The controller can control the bus device to start executing the s-1th startup phase by, but is not limited to, the following method: when the s-1th startup phase includes an information reading phase, the s-1th startup phase includes a signal receiving phase, and when the bus device is controlled to start executing the s-1th startup phase, the target signal sent by the processor is received by the processor at an interval of the s-1th preset time length, wherein the processor is configured to generate and send the target signal to the controller when the target information is read from the register.
[0091] Optionally, in this embodiment, when the processor generates a target signal, it can, but is not limited to, send the target signal to the controller at an interval of a certain length of time. In this way, compared with the related art, the controller controls the bus device to enter the target startup phase only after receiving the target signal. Through the embodiment of the present application, the operation triggered by the target signal is changed, and the time for controlling the bus device to enter the target startup phase is advanced, so that the protocol execution time meets the requirements of the second protocol.
[0092] In an exemplary embodiment, the bus device may be controlled to start executing the sth startup phase by, but not limited to, controlling the bus device to start executing the s+1th startup phase at an interval of the sth preset time length, including: when the sth startup phase includes a signal receiving phase and the s+1th startup phase includes a de-resetting phase, when controlling the bus device to start executing the signal receiving phase, performing a de-resetting operation on the bus device at an interval of the sth preset time length.
[0093] Optionally, in this embodiment, when the control bus device completes the end stage of the execution process of the protocol, it can indicate that the protocol execution process of the second protocol of the bus device is completed, and the protocol execution time of the second protocol can include but is not limited to the time difference between the time when the control bus device enters the target startup stage in the startup stage included in the device startup process and the time when the control bus device completes the end stage of the startup stage included in the device startup process.
[0094] For example, when the target startup phase includes a phase of powering on the bus device and the end phase includes a phase of performing a de-resetting on the bus device, when the de-resetting operation on the bus device is completed, it can be indicated that the protocol execution process of the second protocol has ended. In such a case, the protocol execution time of the second protocol may include but is not limited to the time difference between the time when the bus device starts to be powered on and the time when the de-resetting operation on the bus device is completed.
[0095] In an exemplary embodiment, after controlling the bus device to start executing the s+1th startup phase, the method further includes: when controlling the bus device to start executing the s+1th startup phase and the s+2th startup phase includes a data link establishment phase, generating and sending a data link establishment instruction to the processor at an interval of the s+1th preset time length among the N-2 preset time lengths, wherein the data link establishment instruction is used to instruct the processor to establish a target data link between the processor and the bus device that complies with the first protocol; receiving a data link establishment result returned by the processor, wherein the processor is configured to establish the target data link between the processor and the bus device that complies with the first protocol in response to the received data link establishment instruction.
[0096] Optionally, in this embodiment, when the data link establishment result is used to indicate that establishment of the target data link between the processor and the bus device that complies with the first protocol is complete, it may indicate that the device startup process of the bus device has ended.
[0097] Optionally, in this embodiment, the data link establishment time may include but is not limited to the time difference between the time when the control bus device enters the start stage of the establishment phase included in the data link establishment process and the time when the control bus device completes the execution of the data link establishment process. For example, when the start stage of the establishment phase included in the data link establishment process includes the information reading phase and the end stage of the establishment phase included in the data link establishment process includes the data link establishment phase, the data link establishment time includes the time difference between the time when the control bus device starts to enter the information reading phase and the time when the control bus device completes the execution of the data link establishment phase.
[0098] In an exemplary embodiment, a device interface is deployed on the server, the device interface is connected to the bus device, and a storage space is deployed in the server. Before detecting the startup operation triggered on the bus device, the method also includes: configuring a preset duration of the interval between startup stages included in the device startup process of the bus device of the device interface according to the protocol execution process and the data link establishment process; and recording the preset duration of the interval between the startup stages included in the device startup process of a device interface having a corresponding relationship and the bus device of the device interface in the storage space.
[0099] Optionally, in this embodiment, the protocol execution process may be but is not limited to including multiple startup phases, the data link establishment process may be but is not limited to including multiple establishment phases, and the preset duration between the startup phases included in the device startup process of the bus device of the device interface may be but is not limited to configuring the multiple startup phases included in the protocol execution process and the multiple establishment phases included in the data link establishment process.
[0100] In order to better understand the hot-plugging process of the bus device in the embodiment of the present application, the hot-plugging process of the bus device in the embodiment of the present application is explained and illustrated in combination with optional embodiments below, which can be applicable to but not limited to the embodiment of the present application.
[0101] Figure 6 is a schematic diagram of hot insertion of an optional bus device according to an embodiment of the present application, such as Figure 6 As shown, the bus device may include an OPC card, the first protocol may include a PCIE protocol, and the second protocol may include an OCP3.0 protocol as an example, and the preset duration between the configured startup phases may include Tdelay, Tdriver, Treset, and Tlink as an example, but is not limited to.
[0102] By modifying the CPLD code, after receiving the Hotplug Button, the OCP card is powered on in advance, and the OS is notified by delaying the reporting of the Hotplug Button information, so that the entire hot plug process meets the requirements of both the OCP3.0 protocol and the PCIE protocol. The following steps may be included but are not limited to:
[0103] 1) Currently, IO Expander is simulated by CPLD, which can monitor all signals related to hot-swapping of OCP cards.
[0104] 2) After the CPLD recognizes that the start trigger component (e.g., Hotplug Button) is pressed, it no longer directly gives the information (e.g., Button signal) indicating whether the start trigger component has been triggered to the OS, nor waits for the target signal (e.g., PWREN signal) sent by the OS. Instead, it immediately controls the OCP card to enter the starting stage of the protocol execution process (e.g., powering on the OCP card) and starts the delay count.
[0105] 3) After Tdelay (equivalent to the first preset duration), the CPLD updates the Hotplug Button information (equivalent to the information used to indicate whether the startup trigger component has been triggered) into the register and triggers an interrupt to notify the OS to use I2C to read the information.
[0106] 4) After OS reads the Button signal, after Tdriver time, the driver loading is completed, and PWREN is sent to CPLD, and the Data Link process is started at the same time (equivalent to the process of establishing a data link that complies with the PCIE protocol).
[0107] 5) After CPLD parses PWREN, it starts counting. After the Treset time, it releases the reset of the OCP card (equivalent to releasing the reset). Then the OS can establish a PCIE connection with the OCP card and complete the hot insertion process of the OCP card.
[0108] By using the embodiment of the present application, while keeping the current system topology unchanged, only by modifying the CPLD code, the information time difference of interaction with the OCP card and the OS is accurately controlled, so that the information interaction of the entire system is in a relatively balanced state, thereby achieving the result of satisfying both the “>1S” required by the OCP3.0 protocol and the “<1S” required by the PCIE protocol, and solving the conflict problem between the OCP3.0 protocol and the PCIE protocol regarding hot plugging regulations.
[0109] In an exemplary embodiment, the M preset durations can be configured according to the protocol execution time and the establishment time, but are not limited to, by performing the following steps, wherein N is a positive integer greater than or equal to 2, and M is a positive integer: screening the tth preset duration from the M preset durations, and configuring the tth preset duration, wherein the tth preset duration is the duration between the start of execution of a first reference startup phase among the N startup phases and the start of execution of a second reference startup phase among the N startup phases, the protocol execution process and the data link establishment process both include the first reference startup phase and the second reference startup phase, and t is a positive integer less than or equal to N; and configuring the preset durations among the M preset durations except the tth preset duration according to the tth preset duration.
[0110] Optionally, in this embodiment, the startup phase included in the protocol execution process and the startup phase included in the data link establishment process may include but is not limited to at least two identical phases. When the startup phase included in the protocol execution process and the establishment phase included in the data link establishment process both include W startup phases, W is a positive integer greater than or equal to 3, and the first reference startup phase and the second reference startup phase may be randomly selected from the W startup phases, but is not limited to, or adjacent first reference startup phases may be selected from the W startup phases, but is not limited to.
[0111] In an exemplary embodiment, the preset durations among the M preset durations except the tth preset duration can be configured according to the tth preset duration in the following manner, but not limited to: configuring K preset durations among the M preset durations except the tth preset duration by executing the following steps, wherein the K preset durations are preset durations for determining the execution time of the protocol, and K is a positive integer less than or equal to M: subtracting the tth preset duration from the second preset duration to obtain a first difference preset duration; configuring each of the K preset durations according to the first difference preset duration, wherein the sum of the K preset durations is equal to the first difference preset duration.
[0112] Optionally, in this embodiment, the sum of the K preset time lengths may be determined as the protocol execution time, but is not limited to the sum of the K preset time lengths.
[0113] Optionally, in this embodiment, each preset duration in the K preset durations may be configured according to the first preset duration of the difference, but is not limited to. As an optional example, each preset duration in the K preset durations may be randomly configured within the first preset duration of the difference, but is not limited to, for example, when the first preset duration of the difference is 2s and the K preset durations include preset duration 1 and preset duration 2, preset duration 1 may be configured as 0.5s and preset duration 2 may be configured as 1.5s, or preset duration 1 may be configured as 0.9s and preset duration 2 may be configured as 1.1s.
[0114] In an exemplary embodiment, it is possible but not limited to executing the following steps to configure each of the K preset time lengths according to Q first difference preset time lengths, wherein the qth first difference preset time length among the Q first difference preset time lengths is obtained by subtracting the tth preset time length configured Q times from the second preset time length, Q is a positive integer greater than or equal to 2, and q is a positive integer less than or equal to Q: performing an averaging operation on the Q first difference preset time lengths to obtain an average difference preset time length; configuring each of the K preset time lengths according to the average difference preset time length, wherein the sum of the K preset time lengths is equal to the average difference preset time length.
[0115] Optionally, in this embodiment, it is possible but not limited to perform Q configurations on the tth preset duration, and obtain the duration difference obtained by subtracting the corresponding tth preset duration from the second preset duration in each configuration in the Q configurations to obtain Q duration differences, and it is possible but not limited to perform an average value operation on the Q duration differences to obtain an average difference preset duration.
[0116] Optionally, in this embodiment, it is possible but not limited to randomly configuring each of the K preset time lengths within the range of the preset time length of the average difference. For example, when the preset time length of the average difference is 3s and the K preset time lengths include preset time length 1 and preset time length 2, it is possible but not limited to configuring preset time length 1 to 0.6s and preset time length 2 to 2.4s; or configuring preset time length 1 to 1.6s and preset time length 2 to 1.4s.
[0117] In an exemplary embodiment, it is possible but not limited to configuring P preset durations among the M preset durations excluding the tth preset duration by executing the following steps, wherein the M preset durations include the tth preset duration, the P preset durations and K preset durations, P is a positive integer less than or equal to M, and the P preset durations are preset durations used to determine the establishment time: subtracting the tth preset duration from the second preset duration to obtain a second difference preset duration; and configuring each of the P preset durations according to the second difference preset duration.
[0118] Optionally, in this embodiment, the sum of the P preset time durations may be, but is not limited to, determined as the data link establishment time, and the second preset time duration may be, but is not limited to, used to indicate the data link establishment time.
[0119] Optionally, in this embodiment, each of the P preset time lengths can be randomly configured according to the second difference preset time length, but is not limited to. For example, when the second difference preset time length is 5s and the P preset time lengths include preset time length 1 and preset time length 2, it is possible but not limited to configuring preset time length 1 to 3.5s and configuring preset time length 2 to 1.5s; or configuring preset time length 1 to 1.9s and configuring preset time length 2 to 3.1s.
[0120] In an exemplary embodiment, before configuring the preset durations other than the tth preset duration among the M preset durations according to the tth preset duration, the method further includes: detecting the duration difference between the protocol execution time and the establishment time; performing a sum operation on a target product and the duration difference to obtain a sum duration, wherein the target product is a value obtained by performing a product operation on the duration difference and a target ratio; and configuring a second preset duration as the sum duration.
[0121] Optionally, in this embodiment, the target ratio can be but is not limited to being set based on user experience and general derating specifications, or an average of the ratios obtained through multiple tests, etc. For example, the target ratio can be but is not limited to 0.2 or 0.3 or 0.25, etc., and this application does not impose any restrictions on this.
[0122] According to another embodiment of the present application, another server PCle device hot insertion control method is provided, including: a processor, a programmable logic controller connected to the processor, and used to: detect a hot insertion trigger signal of the PCle device; after receiving the hot insertion trigger signal of the PCle device, the programmable logic controller controls the PCle device to power on and starts a first preset time delay; after the first preset time delay is completed, the processor starts the driver loading of the PCle device according to the read hot insertion trigger signal; after the driver loading of the PCle device is completed, the processor sends a power enable signal to the programmable logic controller, and the programmable logic controller establishes a high-speed connection between the PCle device and the processor according to the power enable signal to realize the hot insertion of the PCle device.
[0123] Optionally, in this embodiment, the power enable signal may include, but is not limited to, a Power EN signal.
[0124] In order to better understand the configuration process of the preset duration in the embodiment of the present application, the configuration process of the preset duration in the embodiment of the present application is explained and illustrated in combination with optional embodiments below, which can be applicable to but not limited to the embodiment of the present application.
[0125] Due to the different manufacturers of OCP cards, the driver loading capabilities of different OS and the speed of establishing PCIE connections are different, so CPLD needs to dynamically adjust the time parameters to meet the timing requirements of different OS and different brands of OCP manufacturers. Figure 6 As shown, Tdelay (equivalent to the first preset duration) and Treset are controlled by CPLD, and Tdriver is determined by OS. However, CPLD can calculate Tdriver by parsing I2C data, and Tlink is not perceptible to CPLD. According to OCP3.0 protocol and PCIE protocol, formula ① and formula ② can be obtained:
[0126] Formula ①: Tdelay+Tdriver+Treset>1S;
[0127] Formula ②: Tdriver+Tlink<1S;
[0128] Furthermore, according to the above two formulas, we can get formula ③ and formula ④:
[0129] Formula ③: Tdelay+Treset(Min)=1S-Tdriver;
[0130] Formula ④: Tlink(Max)=1S-Tdriver;
[0131] According to formula ③ and formula ④, in the extreme case, Tdelay+Treset(Min) is equal to Tlink(Max), so that the hot insertion process of the OCP card can meet the requirements of both protocols at the same time. Considering the user experience of customers, the value of Tdelay+Treset cannot be increased indefinitely; according to the general derating specification, the time margin can be set to 20% (equivalent to the target ratio of 20%), that is: Formula ⑤: Tdelay+Treset(Min)-Tlink(Max)=0.2S;
[0132] Substituting formula ⑤ into formula ③, we can get: Formula ⑥: Tdelay+Treset = 1.2S-Tdriver;
[0133] Since Tdriver is controlled by OS, Tdriver has a certain degree of discreteness with different versions, different manufacturers' OS, and different manufacturers' OCP cards. When the first version of CPLD code is implemented, Tdriver can be configured to 0 but is not limited to it. At this time, the default setting of Tdelay+Treset is 1.2S and stored in the UFM of CPLD. After that, each time the machine is turned on, CPLD will calculate the value of Tdriver to obtain the value of Tdelay+Treset. After accumulating 10 times (equivalent to Q equals 10), CPLD calculates the average value of Tdelay+Treset for 10 consecutive times (for example, 900ms) and updates it to the UFM of CPLD. By dynamically adjusting the time parameters in this way, the requirements of the driver loading capacity of OCP cards from different manufacturers and different OS and the rate of establishing connection of PCIE can be met, so that the response speed, stability and protocol compliance of the entire OCP hot-plug process can be guaranteed to be in the best state.
[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0135] In this embodiment, a server bus device hot-plug control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0136] Fig. 9 is a structural block diagram of a server bus device hot-plug control device according to an embodiment of the present application, such as Fig. 9 As shown, the server includes a processor and a controller, the controller is connected to the processor, the processor is used to interact with a bus device connected to the server through a data link that complies with a first protocol, the method is applied to the controller, and the device includes:
[0137] A first detection module 902, used to detect a start operation triggered on the bus device;
[0138] A first control module 904 is used to control the bus device to enter a target startup phase in a startup phase included in a device startup process when it is detected that the startup operation is triggered on the bus device, wherein the target startup phase is a starting phase of a protocol execution process of the bus device having a second protocol, and the second protocol is different from the first protocol;
[0139] The second control module 906 is used to control the bus device to execute other startup phases except the target startup phase in the device startup process after a first preset time period configured by the interval.
[0140] Through the above-mentioned device, when it is detected that the bus device has been triggered to start the operation, the bus device is directly controlled to enter the starting stage of the startup phase, the timing of the protocol execution process is started, and then the bus device is controlled to execute other startup phases except the starting stage in the startup phase according to the preset duration of the interval between the startup phases included in the device startup process of the configured bus device. In this way, the time of the protocol execution process is lengthened, and the time for establishing the data link is shortened, so that the protocol execution time satisfies the second protocol supported by the bus device, and the time for establishing the data link also satisfies the first protocol, thereby avoiding the startup failure of the bus device due to the conflict between the time of executing the startup phase and the time of establishing the data link. Therefore, the problem of low success rate of the startup of the bus device can be solved, and the effect of improving the success rate of the startup of the bus device can be achieved.
[0141] In an exemplary embodiment, the server further includes a start trigger component, the start trigger component is connected to the controller, and the first detection module includes:
[0142] A detection unit, used to detect whether the start trigger component has been triggered;
[0143] The first determining unit is configured to determine, when it is detected that the start trigger component has been triggered to perform the trigger operation, whether or not the start operation is triggered on the bus device.
[0144] In an exemplary embodiment, the controller is further provided with a register, the register being used to store information on whether a trigger operation is performed on the start trigger component, and the device further comprises:
[0145] an extraction module, configured to extract target information of the startup trigger component after the bus device is controlled to enter a target startup phase in the startup phase included in the device startup process, wherein the target information is used to indicate that the startup trigger component has been triggered by the trigger operation;
[0146] A storage module is used to store the target information in the register.
[0147] In an exemplary embodiment, the bus device is connected to a device interface on the server, and the second control module includes:
[0148] In the case where the device startup process includes N startup phases, the bus device is controlled to execute N-1 startup phases of the N startup phases except the target startup phase after a first preset time length configured by the interval by performing the following steps, wherein N is a positive integer greater than or equal to 2:
[0149] An extraction unit, used to extract M preset durations between the configured N startup phases, where M is a positive integer;
[0150] A second determining unit is used to determine, according to the M preset durations, a preset duration between the target startup phase and the first startup phase in the N-1 startup phases and a preset duration between adjacent startup phases in the N-1 startup phases, to obtain a reference preset duration;
[0151] A control unit is used to control the bus device to execute N-1 startup phases among the N startup phases except the target startup phase according to the reference preset time length.
[0152] In an exemplary embodiment, the second determining unit is configured to:
[0153] The M preset durations are determined by executing the following steps to determine the i-th preset duration between the start of the i-th startup phase and the start of the i+1-th startup phase in the N-1 startup phases, wherein i is a positive integer less than or equal to N-1, and the reference preset duration includes the i-th preset duration:
[0154] extracting the i-th preset duration from the preset durations other than the first preset duration among the M preset durations; or,
[0155] Extract the i2-1th preset duration and the i1-1th preset duration from the preset durations excluding the first preset duration among the M preset durations, wherein the i1-1th preset duration is the preset duration between the start of the i-1th startup phase in the N-1 startup phases and the start of the i-th startup phase, and the i2-1th preset duration is the preset duration between the i-1th startup phase and the i+1th startup phase in the N-1 startup phases; determine the i-th preset duration based on the i2-1th preset duration and the i1-1th preset duration, wherein i1 equals i2 equals i.
[0156] In an exemplary embodiment, the second determining unit is further configured to:
[0157] The i-th preset duration is determined as a value obtained by subtracting the i1-1-th preset duration from the i2-1-th preset duration.
[0158] In an exemplary embodiment, the control unit is configured to:
[0159] In the case of controlling the bus device to start executing the target startup phase, controlling the bus device to start executing the first startup phase at an interval of a first preset duration in N-1 preset durations, wherein the reference preset duration includes the N-1 preset durations;
[0160] When controlling the bus device to start executing the first startup phase, the bus device is controlled to execute corresponding startup phases among the N-1 startup phases except the first startup phase according to N-2 preset time lengths, wherein the N-2 preset time lengths are preset time lengths among the reference preset time lengths except the preset time length between the target startup phase and the first startup phase.
[0161] In an exemplary embodiment, the server further includes a start trigger component, the start trigger component is connected to the controller, a register is further disposed in the controller, the register stores target information indicating that the start trigger component is triggered, and the control unit is used to:
[0162] When the bus device is controlled to start executing the target startup phase and the first startup phase includes an information reading phase, a target read instruction is generated and sent to the processor at an interval of the first preset time length, wherein the target read instruction is used to instruct the processor to read the information stored in the register from the register, and the processor is configured to read the information stored in the register in response to the received target read instruction.
[0163] In an exemplary embodiment, the control unit is further configured to:
[0164] By executing the following steps, according to the s-1th preset time length among the N-2 preset time lengths, the bus device is controlled to execute the s-th startup stage among the startup stages except the first startup stage among the N-1 startup stages, and according to the s-1th preset time length among the N-2 preset time lengths, the bus device is controlled to execute the s+1th startup stage among the startup stages except the first startup stage among the N-1 startup stages, wherein the s-1th preset time length is the preset time length between starting to execute the s-1th startup stage and starting to execute the s-th startup stage, the s-th preset time length is the preset time length between starting to execute the s-1th startup stage and starting to execute the s-1th startup stage, and s is a positive integer less than or equal to N-2 and greater than 1:
[0165] In the case of controlling the bus device to start executing the s-1th startup phase, starting to control the bus device to start executing the s-1th startup phase after an interval of the s-1th preset time length;
[0166] In the case of controlling the bus device to start executing the sth startup phase, the bus device is controlled to start executing the s+1th startup phase after an interval of the sth preset time length.
[0167] In an exemplary embodiment, a register is also deployed in the controller, and the register stores target information for indicating that a trigger operation has been executed on the start trigger component. The control unit is also used to: when the s-1th startup phase includes an information reading phase, the sth startup phase includes a signal receiving phase, and the bus device is controlled to start executing the s-1th startup phase, receive the target signal sent by the processor at an interval of the s-1th preset time length, wherein the processor is configured to generate and send the target signal to the controller when the target information is read from the register.
[0168] In an exemplary embodiment, the control unit is further used for: when the sth startup phase includes a signal receiving phase and the s+1th startup phase includes a de-resetting phase, while controlling the bus device to start executing the signal receiving phase, performing a de-resetting operation on the bus device at an interval of the sth preset time length.
[0169] In an exemplary embodiment, the apparatus further comprises:
[0170] a generating module, configured to generate and send a data link establishment instruction to the processor at an interval of the s+1th preset time length among the N-2 preset time lengths, after the bus device is controlled to start executing the s+1th startup phase, in a case where the bus device is controlled to start executing the s+1th startup phase and the s+2th startup phase includes a data link establishment phase, wherein the data link establishment instruction is used to instruct the processor to establish a target data link between the processor and the bus device that complies with the first protocol;
[0171] A receiving module is used to receive a data link establishment result returned by the processor, wherein the processor is configured to establish the target data link between the processor and the bus device in accordance with the first protocol in response to the received data link establishment instruction.
[0172] In an exemplary embodiment, a device interface is deployed on the server, the device interface is connected to the bus device, a storage space is deployed in the server, and the apparatus further includes:
[0173] A first configuration module, configured to configure, before the detection of the startup operation triggered on the bus device, a preset duration of intervals between startup phases included in the device startup process of the bus device of the device interface according to the protocol execution process and the data link establishment process;
[0174] The recording module is used to record the preset duration of the interval between the startup phases included in the device startup process of the device interface having a corresponding relationship and the bus device of the device interface in the storage space.
[0175] In an exemplary embodiment, the first configuration module includes: when the device startup process of the bus device of the device interface includes N startup stages, and the preset durations between the N startup stages include M preset durations, configuring the M preset durations according to the protocol execution time and the establishment time by executing the following steps, wherein N is a positive integer greater than or equal to 2, and M is a positive integer:
[0176] a screening unit, configured to screen a t-th preset duration from the M preset durations, and configure the t-th preset duration, wherein the t-th preset duration is a duration between starting to execute a first reference startup phase among the N startup phases and starting to execute a second reference startup phase among the N startup phases, the protocol execution process and the data link establishment process both include the first reference startup phase and the second reference startup phase, and t is a positive integer less than or equal to N;
[0177] A configuration unit is used to configure the preset durations among the M preset durations except the tth preset duration according to the tth preset duration.
[0178] In an exemplary embodiment, the configuration unit is used to configure the M preset durations except K preset durations in the t-th preset duration by performing the following steps, wherein the K preset durations are preset durations for determining the protocol execution time, and K is a positive integer less than or equal to M:
[0179] Subtract the t-th preset duration from the second preset duration to obtain a first difference preset duration;
[0180] Each of the K preset durations is configured according to the first difference preset duration, wherein the sum of the K preset durations is equal to the first difference preset duration.
[0181] In an exemplary embodiment, the configuration unit is further used to: configure each preset duration of the K preset durations according to Q first difference preset durations by performing the following steps, wherein the qth first difference preset duration of the Q first difference preset durations is obtained by subtracting the tth preset duration configured for the qth time among the tth preset duration configured for the Q times from the second preset duration, Q is a positive integer greater than or equal to 2, and q is a positive integer less than or equal to Q:
[0182] Performing an averaging operation on the Q first difference preset durations to obtain an average difference preset duration;
[0183] According to the average difference preset duration, each of the K preset durations is configured, wherein the sum of the K preset durations is equal to the average difference preset duration.
[0184] In an exemplary embodiment, the configuration unit is used to: configure P preset durations among the M preset durations except the t-th preset duration by performing the following steps, wherein the M preset durations include the t-th preset duration, the P preset durations, and K preset durations, P is a positive integer less than or equal to M, and the P preset durations are preset durations for determining the establishment time:
[0185] Subtract the t-th preset duration from the second preset duration to obtain a second difference preset duration;
[0186] According to the second difference preset time length, each preset time length of the P preset time lengths is configured.
[0187] In an exemplary embodiment, the apparatus further comprises:
[0188] A second detection module, configured to detect a time difference between the protocol execution time and the establishment time before configuring a preset time other than the t-th preset time among the M preset time according to the t-th preset time;
[0189] An execution module, configured to perform a sum operation on a target product and the duration difference to obtain a sum duration, wherein the target product is a value obtained by performing a product operation on the duration difference and a target ratio;
[0190] The second configuration module is used to configure the second preset duration as the sum duration.
[0191] According to another embodiment of the present application, another server PCle device hot insertion control device is provided, including: a processor, a programmable logic controller connected to the processor, and configured to:
[0192] The third detection module detects the hot insertion trigger signal of the PCle device;
[0193] A third control module, configured for the programmable logic controller to control the PCle device to power on and start a first preset time delay after receiving a hot plug trigger signal of the PCle device;
[0194] A startup module, used for the processor to start the driver loading of the PCle device according to the read hot plug trigger signal after the first preset time delay is completed;
[0195] A module is established, in which the processor sends a power enable signal to the programmable logic controller after the driver loading of the PCle device is completed, and the programmable logic controller establishes a high-speed connection between the PCle device and the processor according to the power enable signal to realize hot insertion of the PCle device.
[0196] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0197] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0198] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0199] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0200] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0201] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0202] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0203] An embodiment of the present application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0204] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0205] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0206] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A server bus device hot plug control method, characterized in that: The server includes a processor and a controller, the controller is connected to the processor, the processor is used to interact with a bus device connected to the server through a data link that complies with a first protocol, the method is applied to the controller, and the method includes: Detecting a start operation triggered on the bus device; In the case of detecting that the bus device is triggered to perform the startup operation, controlling the bus device to enter a target startup phase in a startup phase included in a device startup process, wherein the target startup phase is a start phase of a protocol execution process of the bus device having a second protocol, and the second protocol is different from the first protocol; After a first preset time length configured by the interval, controlling the bus device to execute other startup phases except the target startup phase in the device startup process; The bus device is connected to the device interface on the server, and after a first preset time period configured at an interval, the bus device is controlled to execute other startup phases except the target startup phase during the device startup process, including: In the case where the device startup process includes N startup phases, the bus device is controlled to execute N-1 startup phases of the N startup phases except the target startup phase after a first preset time length configured by the interval by performing the following steps, wherein N is a positive integer greater than or equal to 2: Extracting M preset durations between the N startup phases configured, where M is a positive integer; According to the M preset durations, determine the preset duration between the target startup phase and the first startup phase in the N-1 startup phases and the preset duration between adjacent startup phases in the N-1 startup phases to obtain a reference preset duration; According to the reference preset time length, the bus device is controlled to execute N-1 startup phases among the N startup phases except the target startup phase.
2. The method according to claim 1, characterized in that The server further includes a startup trigger component, which is connected to the controller. The detecting of the startup operation triggered on the bus device includes: Detecting whether the start trigger component has been triggered; In the case where it is detected that the start triggering component has been triggered to perform the triggering operation, it is determined that it is detected that the start operation is triggered on the bus device.
3. The method according to claim 1, characterized in that The controller is further provided with a register, the register being used to store information on whether a trigger operation has been executed on the startup trigger component. After controlling the bus device to enter a target startup phase in the startup phase included in the device startup process, the method further includes: Extracting target information of the start trigger component, wherein the target information is used to indicate that the start trigger component has been triggered by the trigger operation; The target information is stored in the register.
4. The method according to claim 1, characterized in that: The step of determining, based on the M preset durations, a preset duration between the target startup phase and a first startup phase in the N-1 startup phases and a preset duration between adjacent startup phases in the N-1 startup phases to obtain a reference preset duration includes: The M preset durations are determined by executing the following steps to determine the i-th preset duration between the start of the i-th startup phase and the start of the i+1-th startup phase in the N-1 startup phases, wherein i is a positive integer less than or equal to N-1, and the reference preset duration includes the i-th preset duration: extracting the i-th preset duration from the preset durations other than the first preset duration among the M preset durations; or, Extract the i2-1th preset duration and the i1-1th preset duration from the preset durations excluding the first preset duration among the M preset durations, wherein the i1-1th preset duration is the preset duration between the start of the i-1th startup phase in the N-1 startup phases and the start of the i-th startup phase, and the i2-1th preset duration is the preset duration between the i-1th startup phase and the i+1th startup phase in the N-1 startup phases; determine the i-th preset duration based on the i2-1th preset duration and the i1-1th preset duration, wherein i1 equals i2 equals i.
5. The method according to claim 4, characterized in that The determining the i-th preset duration according to the i2-1-th preset duration and the i1-1-th preset duration includes: The i-th preset duration is determined as a value obtained by subtracting the i1-1-th preset duration from the i2-1-th preset duration.
6. The method according to claim 1, characterized in that The controlling the bus device to execute N-1 startup phases among the N startup phases except the target startup phase according to the reference preset duration includes: In the case of controlling the bus device to start executing the target startup phase, controlling the bus device to start executing the first startup phase at an interval of a first preset duration in N-1 preset durations, wherein the reference preset duration includes the N-1 preset durations; When controlling the bus device to start executing the first startup phase, the bus device is controlled to execute corresponding startup phases among the N-1 startup phases except the first startup phase according to N-2 preset time lengths, wherein the N-2 preset time lengths are preset time lengths among the reference preset time lengths except the preset time length between the target startup phase and the first startup phase.
7. The method according to claim 6, characterized in that The server further includes a startup trigger component, the startup trigger component is connected to the controller, the controller is further provided with a register, the register stores target information for indicating that the startup trigger component is triggered, and in the case of controlling the bus device to start executing the target startup phase, the first preset time length in the N-1 preset time lengths is interval, and the bus device is controlled to start executing the first startup phase, including: When the bus device is controlled to start executing the target startup phase and the first startup phase includes an information reading phase, a target read instruction is generated and sent to the processor at an interval of the first preset time length, wherein the target read instruction is used to instruct the processor to read the information stored in the register from the register, and the processor is configured to read the information stored in the register in response to the received target read instruction.
8. The method according to claim 6, characterized in that The controlling the bus device to execute a corresponding startup phase among the N-1 startup phases except the first startup phase according to the N-2 preset durations includes: By executing the following steps, according to the s-1th preset time length among the N-2 preset time lengths, the bus device is controlled to execute the s-th startup stage among the startup stages except the first startup stage among the N-1 startup stages, and according to the s-1th preset time length among the N-2 preset time lengths, the bus device is controlled to execute the s+1th startup stage among the startup stages except the first startup stage among the N-1 startup stages, wherein the s-1th preset time length is the preset time length between starting to execute the s-1th startup stage and starting to execute the s-th startup stage, the s-th preset time length is the preset time length between starting to execute the s-1th startup stage and starting to execute the s-1th startup stage, and s is a positive integer less than or equal to N-2 and greater than 1: In the case of controlling the bus device to start executing the s-1th startup phase, starting to control the bus device to start executing the s-1th startup phase after an interval of the s-1th preset time length; In the case of controlling the bus device to start executing the sth startup phase, the bus device is controlled to start executing the s+1th startup phase after an interval of the sth preset time length.
9. The method according to claim 8, characterized in that The controller is also provided with a register, in which target information indicating that a trigger operation has been executed on the start trigger component is stored. When the bus device is controlled to start executing the s-1th startup phase, the bus device is controlled to start executing the s-1th startup phase at an interval of the s-1th preset time length, including: when the s-1th startup phase includes an information reading phase, the s-1th startup phase includes a signal receiving phase, and when the bus device is controlled to start executing the s-1th startup phase, the target signal sent by the processor is received at an interval of the s-1th preset time length, wherein the processor is configured to generate and send the target signal to the controller when the target information is read from the register.
10. The method according to claim 8, characterized in that The method of controlling the bus device to start executing the sth startup phase and then controlling the bus device to start executing the s+1th startup phase after an interval of the sth preset time length comprises: when the sth startup phase includes a signal receiving phase and the s+1th startup phase includes a de-resetting phase, then, when controlling the bus device to start executing the signal receiving phase, performing a de-resetting operation on the bus device after an interval of the sth preset time length.
11. The method according to claim 8, characterized in that After controlling the bus device to start executing the s+1th startup phase, the method further includes: In a case where the bus device is controlled to start executing the s+1th startup phase, and the s+2th startup phase includes a data link establishment phase, generating and sending a data link establishment instruction to the processor at intervals of the s+1th preset time length in the N-2 preset time lengths, wherein the data link establishment instruction is used to instruct the processor to establish a target data link between the processor and the bus device that complies with the first protocol; The data link establishment result returned by the processor is received, wherein the processor is configured to establish the target data link between the processor and the bus device in accordance with the first protocol in response to the received data link establishment instruction.
12. The method according to claim 1, characterized in that The server is provided with a device interface, the device interface is connected to the bus device, the server is provided with a storage space, and before the detection of the startup operation triggered on the bus device, the method further includes: According to the protocol execution process and the data link establishment process, configuring a preset duration of intervals between startup phases included in the device startup process of the bus device of the device interface; The preset duration of intervals between startup phases included in a device startup process of a device interface having a corresponding relationship and a bus device of the device interface is recorded in the storage space.
13. The method according to claim 12, characterized in that The configuring the preset duration of intervals between startup phases included in the device startup process of the bus device of the device interface according to the protocol execution process and the data link establishment process comprises: when the device startup process of the bus device of the device interface comprises N startup phases, and the preset duration of intervals between the N startup phases comprises M preset durations, configuring the M preset durations according to the protocol execution time and the establishment time by executing the following steps, wherein N is a positive integer greater than or equal to 2, and M is a positive integer: Screening a t-th preset duration from the M preset durations, and configuring the t-th preset duration, wherein the t-th preset duration is the duration between starting to execute a first reference startup phase among the N startup phases and starting to execute a second reference startup phase among the N startup phases, the protocol execution process and the data link establishment process both include the first reference startup phase and the second reference startup phase, and t is a positive integer less than or equal to N; According to the tth preset time length, the preset time lengths among the M preset time lengths except the tth preset time length are configured.
14. The method according to claim 13, characterized in that The configuring, according to the t-th preset duration, the preset durations among the M preset durations except the t-th preset duration, comprises: configuring K preset durations among the M preset durations except the t-th preset duration by executing the following steps, wherein the K preset durations are preset durations for determining the protocol execution time, and K is a positive integer less than or equal to M: Subtract the t-th preset duration from the second preset duration to obtain a first difference preset duration; Each of the K preset durations is configured according to the first difference preset duration, wherein the sum of the K preset durations is equal to the first difference preset duration.
15. The method according to claim 14, characterized in that The configuring each of the K preset durations according to the first difference preset duration, wherein the sum of the K preset durations is equal to the first difference preset duration, comprises: configuring each of the K preset durations according to Q first difference preset durations by executing the following steps, wherein the qth first difference preset duration among the Q first difference preset durations is obtained by subtracting the tth preset duration configured Q times among the tth preset duration configured Q times from the second preset duration, Q is a positive integer greater than or equal to 2, and q is a positive integer less than or equal to Q: Performing an averaging operation on the Q first difference preset durations to obtain an average difference preset duration; According to the average difference preset duration, each of the K preset durations is configured, wherein the sum of the K preset durations is equal to the average difference preset duration.
16. The method according to claim 13, characterized in that The configuring, according to the t-th preset duration, the preset durations among the M preset durations except the t-th preset duration, comprises: configuring P preset durations among the M preset durations except the t-th preset duration by executing the following steps, wherein the M preset durations include the t-th preset duration, the P preset durations, and K preset durations, P is a positive integer less than or equal to M, and the P preset durations are preset durations used to determine the establishment time: Subtract the t-th preset duration from the second preset duration to obtain a second difference preset duration; According to the second difference preset time length, each preset time length of the P preset time lengths is configured.
17. The method according to claim 13, characterized in that Before configuring the preset durations other than the t-th preset duration among the M preset durations according to the t-th preset duration, the method further includes: Detecting a time difference between the protocol execution time and the establishment time; Performing a sum operation on the target product and the duration difference to obtain a sum duration, wherein the target product is a value obtained by performing a product operation on the duration difference and the target ratio; The second preset duration is configured as the sum duration.
18. A server PCle device hot-plug control method, characterized in that: The invention comprises a processor, a programmable logic controller connected to the processor, and configured to: Detect hot-plug trigger signal of PCle device; After receiving the hot plug trigger signal of the PCle device, the programmable logic controller controls the PCle device to power on and starts a first preset time delay; The processor starts the driver loading of the PCle device according to the read hot plug trigger signal after the first preset time delay is completed; The processor sends a power enable signal to the programmable logic controller after the driver loading of the PCle device is completed, and the programmable logic controller establishes a high-speed connection between the PCle device and the processor according to the power enable signal to realize hot insertion of the PCle device; The hot insertion process of the PCle device includes N startup stages, the N startup stages are a target startup stage and N-1 startup stages other than the target startup stage, the target startup stage includes the step of detecting a hot insertion trigger signal of the PCle device and the step of the programmable logic controller controlling the power-on of the PCle device after receiving the hot insertion trigger signal of the PCle device; the N-1 startup stages other than the target startup stage include the step of the processor starting the driver loading of the PCle device according to the read hot insertion trigger signal after the first preset time delay is completed, and the processor sending a power enable signal to the programmable logic controller after the driver loading of the PCle device is completed, and the programmable logic controller establishes a high-speed connection between the PCle device and the processor according to the power enable signal to realize the step of hot insertion of the PCle device; By performing the following steps, after the first preset time delay is completed, N-1 startup phases other than the target startup phase are performed, where N is a positive integer greater than or equal to 2: Extracting M preset durations between the N startup phases configured, where M is a positive integer; According to the M preset durations, determine the preset duration between the target startup phase and the first startup phase in the N-1 startup phases and the preset duration between adjacent startup phases in the N-1 startup phases to obtain a reference preset duration; According to the reference preset duration, the PCle device is controlled to execute N-1 startup phases among the N startup phases except the target startup phase.
19. A server bus device hot-plug control device, characterized in that: The server includes a processor and a controller, the controller is connected to the processor, the processor is used to interact with a bus device connected to the server through a data link that complies with a first protocol, the device is applied to the controller, and the device includes: A first detection module, used to detect a start operation triggered on the bus device; a first control module, configured to control the bus device to enter a target startup phase in a startup phase included in a device startup process, when detecting that the startup operation is triggered on the bus device, wherein the target startup phase is a starting phase of a protocol execution process of the bus device having a second protocol, and the second protocol is different from the first protocol; A second control module, configured to control the bus device to execute other startup phases except the target startup phase in the device startup process after a first preset time length configured at an interval; Among them, the bus device is connected to the device interface on the server, and the second control module includes: when the device startup process includes N startup stages, by executing the following steps, after the first preset time length of the interval configuration, the bus device is controlled to execute N-1 startup stages among the N startup stages except the target startup stage, wherein N is a positive integer greater than or equal to 2: an extraction unit, used to extract M preset time lengths between the configured N startup stages, M is a positive integer; a second determination unit, used to determine the preset time length of the interval between the target startup stage and the first startup stage among the N-1 startup stages and the preset time length between adjacent startup stages among the N-1 startup stages according to the M preset time lengths, to obtain a reference preset time length; a control unit, used to control the bus device to execute N-1 startup stages among the N startup stages except the target startup stage according to the reference preset time length.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 17, or the steps of the method described in claim 18.
21. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the processor implements the steps of the method described in any one of claims 1 to 17, or the steps of the method described in claim 18.
22. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 17 or the steps of the method described in claim 18 are implemented.
Citation Information
Patent Citations
Peripheral component interface express (PCIE) device initialization method and server
CN115686650A
Start control method and device of embedded system, storage medium and electronic equipment
CN116830082A
Server monitoring method and device, substrate controller and embedded system
CN117555760A
Server starting method and server
CN117950732A
