PCIE device management architecture, method, and system, device, and medium
View Patent ↗The present application relates to the technical field of servers, and in particular relates to a PCIE device management architecture, method and system, and a device and a medium. The method includes: acquiring a driver program of a first PCIE switch chip, installing the driver program of the first PCIE switch chip to a baseboard management controller, and establishing a PCIE specification and protocol for communication between a baseboard management controller chip and the first PCIE switch chip; configuring a first PCIE controller in the baseboard management controller to be in an RC mode, and configuring a second PCIE controller of a central processing unit to be in an EP mode; and managing a PCIE device by means of the baseboard management controller configured in the RC mode, thereby improving management efficiency of the baseboard management controller over the PCIE device.
1 . A peripheral component interconnect express (PCIE) device management architecture, comprising:
a baseboard management controller, the baseboard management controller being internally provided with a baseboard management controller chip, a first PCIE switch chip, and a first PCIE controller, the baseboard management controller chip being connected with the first PCIE switch chip, and the first PCIE controller being configured in a Root Complex (RC) mode; and
a central processing unit (CPU), the CPU being in communication connection with the baseboard management controller, the CPU being internally provided with a second PCIE controller, the second PCIE controller being configured in an endpoint device (EP) mode,
the CPU being connected with a second PCIE switch chip, and the second PCIE switch chip being connected with a plurality of PCIE devices, wherein
the plurality of PCIE devices are controlled directly by means of the baseboard management controller configured in the RC mode and an MCTP control instruction;
wherein before the plurality of PCIE devices are controlled directly by means of the baseboard management controller configured in the RC mode and the MCTP control instruction, the plurality of PCIE devices are discovered by means of an MCTP protocol and assigned a device identification code to a discovered PCIE device and the baseboard management controller configured in the RC mode by the baseboard management controller, in the RC mode, being configured to:
send a 0x0B control request broadcast packet to the plurality of PCIE devices, and notify the device identification code of the baseboard management controller;
receive a response 0x0B instruction of a PCIE device carrying an undiscovered flag, and acquire the PCIE device carrying the undiscovered flag;
send a 0x0C control request broadcast packet to the plurality of PCIE devices, and notify the device identification code of the baseboard management controller;
receive a response 0x0C instruction of the PCIE device carrying the undiscovered flag;
send a 0x01 control request to the PCIE device carrying the undiscovered flag, and carrying the device identification code for configuring the PCIE device, wherein the PCIE device carrying the undiscovered flag is marked with a discovered flag and assigned the device identification code; and
receive a PCIE device marked with the discovered flag and a corresponding device identification code.
2 . The PCIE device management architecture according to claim 1 , wherein a southbridge chip-platform controller hub is connected between the CPU and the baseboard management controller, and an embedded controller is arranged in the southbridge chip-platform controller hub.
3 . A peripheral component interconnect express (PCIE) device management method adopting a PCIE device management architecture, wherein the PCIE device management architecture comprises:
a baseboard management controller, the baseboard management controller being internally provided with a baseboard management controller chip, a first PCIE switch chip, and a first PCIE controller, the baseboard management controller chip being connected with the first PCIE switch chip, and the first PCIE controller being configured in a Root Complex (RC) mode; and
a central processing unit (CPU), the CPU being in communication connection with the baseboard management controller, the CPU being internally provided with a second PCIE controller, the second PCIE controller being configured in an endpoint device (EP) mode,
the CPU being connected with a second PCIE switch chip, and the second PCIE switch chip being connected with a plurality of PCIE devices, wherein
the plurality of PCIE devices are controlled directly by the baseboard management controller configured in the RC mode;
wherein the method comprises:
acquiring a driver program of the first PCIE switch chip, installing the driver program of the first PCIE switch chip to the baseboard management controller, and establishing a PCIE specification and protocol for communication between the baseboard management controller chip and the first PCIE switch chip;
configuring the first PCIE controller in the baseboard management controller to be in the RC mode, and configuring the second PCIE controller of the CPU to be in the EP mode; and
directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode;
wherein the directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode comprises:
directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode and an MCTP control instruction;
wherein before the directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode and the MCTP control instruction, the method further comprises:
discovering the plurality of PCIE devices by means of an MCTP protocol, and assigning a device identification code to a discovered PCIE device and the baseboard management controller configured in the RC mode;
wherein the discovering the plurality of PCIE devices by means of an MCTP protocol, and assigning a device identification code to a discovered PCIE device and the baseboard management controller configured in the RC mode comprises:
sending a 0x0B control request broadcast packet to the plurality of PCIE devices, and notifying the device identification code of the baseboard management controller;
receiving a response 0x0B instruction of a PCIE device carrying an undiscovered flag, and acquiring the PCIE device carrying the undiscovered flag;
sending a 0x0C control request broadcast packet to the plurality of PCIE devices, and notifying the device identification code of the baseboard management controller;
receiving a response 0x0C instruction of the PCIE device carrying the undiscovered flag;
sending a 0x01 control request to the PCIE device carrying the undiscovered flag, and carrying the device identification code for configuring the PCIE device, marking the PCIE device carrying the undiscovered flag with a discovered flag, and assigning the device identification code to the plurality of PCIE device; and
receiving a PCIE device marked with the discovered flag and a corresponding device identification code.
4 . The PCIE device management method according to claim 3 , wherein the configuring the first PCIE controller in the baseboard management controller to be in the RC mode comprises:
configuring a register of the first PCIE controller in the baseboard management controller, so as to configure the first PCIE controller in the baseboard management controller to be in the RC mode.
5 . The PCIE device management method according to claim 4 , wherein the configuring a register of the first PCIE controller in the baseboard management controller comprises:
configuring a controller register of the first PCIE controller in the baseboard management controller so as to configure a root port.
6 . The PCIE device management method according to claim 5 , wherein the configuring a register of the first PCIE controller in the baseboard management controller further comprises:
configuring a management component transport protocol (MCTP) register of the first PCIE controller in the baseboard management controller.
7 . The PCIE device management method according to claim 6 , wherein the configuring a register of the first PCIE controller in the baseboard management controller further comprises:
configuring a Direct Media Architecture memory Access (XDMA) register of the first PCIE controller in the baseboard management controller.
8 . The PCIE device management method according to claim 7 , wherein the configuring the second PCIE controller of the CPU to be in the EP mode comprises:
configuring the second PCIE controller of the CPU to be in the EP mode, so as to configure a terminal in which the CPU is located as a proxy terminal.
9 . The PCIE device management method according to claim 8 , wherein after the configuring the second PCIE controller of the CPU to be in the EP mode, the method further comprises:
making the baseboard management controller configured in the RC mode as a bus owner to acquire a management authority for the plurality of PCIE devices, so as to communicate with the plurality of PCIE devices by the terminal in which the CPU is located and that is configured as the proxy terminal.
10 . The PCIE device management method according to claim 3 , wherein the directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode comprises:
directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode and an address operation instruction.
11 . The PCIE device management method according to claim 3 , wherein the directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode comprises:
accessing a configuration space of the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode; and
performing device enable or disable control for the configuration space of the plurality of PCIE devices, and setting an interrupt mode of the plurality of PCIE devices.
12 . The PCIE device management method according to claim 3 , wherein the directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode further comprises:
acquiring device information of the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode; and
storing the device information of the plurality of PCIE devices into a memory of the baseboard management controller for display of the device information on a display interface.
13 . The PCIE device management method according to claim 3 , further comprising:
acquiring fault information of the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode.
14 . The PCIE device management method according to claim 3 , wherein before the sending a 0x0B control request broadcast packet to the plurality of PCIE devices, and notifying the device identification code of the baseboard management controller, the method further comprises:
receiving a 0x0D control request sent by the plurality of PCIE devices, and acquiring the PCIE device carrying an undiscovered flag; and
sending a response 0x0D instruction to the PCIE device carrying the undiscovered flag.
15 . The PCIE device management method according to claim 3 , further comprising:
configuring the first PCIE controller in the baseboard management controller to be in the EP mode, and configuring the second PCIE controller of the CPU to be in the RC mode; and
directly controlling the plurality of PCIE devices by means of the CPU configured in the RC mode.
16 . A computer device, comprising a memory, a processor, and a computer-readable instruction stored on the memory and capable of running on the processor, wherein the processor, when executing the computer-readable instruction, is configured to perform a peripheral component interconnect express (PCIE) device management method adopting a PCIE device management architecture, wherein the PCIE device management architecture comprises:
a baseboard management controller, the baseboard management controller being internally provided with a baseboard management controller chip, a first PCIE switch chip, and a first PCIE controller, the baseboard management controller chip being connected with the first PCIE switch chip, and the first PCIE controller being configured in a Root Complex (RC) mode; and
a central processing unit (CPU), the CPU being in communication connection with the baseboard management controller, the CPU being internally provided with a second PCIE controller, the second PCIE controller being configured in an endpoint device (EP) mode,
the CPU being connected with a second PCIE switch chip, and the second PCIE switch chip being connected with a plurality of PCIE devices, wherein
the plurality of PCIE devices are controlled directly by the baseboard management controller configured in the RC mode;
wherein the (PCIE) device management method comprises:
acquiring a driver program of the first PCIE switch chip, installing the driver program of the first PCIE switch chip to the baseboard management controller, and establishing a PCIE specification and protocol for communication between the baseboard management controller chip and the first PCIE switch chip;
configuring the first PCIE controller in the baseboard management controller to be in the RC mode, and configuring the second PCIE controller of the CPU to be in the EP mode; and
directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode;
wherein the directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode comprises:
directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode and an MCTP control instruction;
wherein before the directly controlling the plurality of PCIE devices by means of the baseboard management controller configured in the RC mode and an MCTP control instruction, the PCE device management method further comprises:
discovering the plurality of PCIE devices by means of an MCTP protocol, and assigning a device identification code to a discovered PCIE device and the baseboard management controller configured in the RC mode;
wherein the discovering the plurality of PCIE devices by means of an MCTP protocol, and assigning a device identification code to a discovered PCIE device and the baseboard management controller configured in the RC mode comprises:
sending a 0x0B control request broadcast packet to the plurality of PCIE devices, and notifying the device identification code of the baseboard management controller;
receiving a response 0x0B instruction of a PCIE device carrying an undiscovered flag, and acquiring the PCIE device carrying the undiscovered flag;
sending a 0x0C control request broadcast packet to the plurality of PCIE devices, and notifying the device identification code of the baseboard management controller;
receiving a response 0x0C instruction of the PCIE device carrying the undiscovered flag;
sending a 0x01 control request to the PCIE device carrying the undiscovered flag, and carrying the device identification code for configuring the PCIE device, marking the PCIE device carrying the undiscovered flag with a discovered flag, and assigning the device identification code to the plurality of PCIE device; and
receiving a PCIE device marked with the discovered flag and a corresponding device identification code.
17 . The PCIE device management method according to claim 6 , wherein the configuring a management component transport protocol (MCTP) register of the first PCIE controller in the baseboard management controller comprises:
configuring communication protocols related to a MCTP of the MCTP register of the first PCIE controller in the baseboard management controller.