CN-121980552-A - Identity information acquisition method, first device, chip and electronic equipment
Abstract
The application discloses an identity information acquisition method, a first device, a chip and electronic equipment, and belongs to the field of processors. The method is executed by a first device, wherein the first device is an internal device of a host system or an external device connected with the host system, and the method comprises the steps of carrying out information exchange with a second device based on first identity information in the process of carrying out link training on the first device and the second device to obtain second identity information of the second device, and after a driver of the first device is loaded, responding to query operation of the driver, and feeding back the second identity information of the second device to the driver. The application exchanges information in the link training process based on the identity information distributed to the equipment after the host system is electrified, so that the identity information of the second device can be quickly inquired after the driver is loaded.
Inventors
- Request for anonymity
- Request for anonymity
- Request for anonymity
Assignees
- 摩尔线程智能科技(上海)有限责任公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260408
Claims (18)
- 1. A method of obtaining identity information, performed by a first device, the first device being an internal device of a host system or an external device connected to the host system, the method comprising: in the process of carrying out link training on the first device and the second device, carrying out information exchange on the second device based on the first identity information to obtain second identity information of the second device; After a driver of the first device is loaded, responding to query operation of the driver, and feeding back the second identity information of the second device to the driver; The first identity information and the second identity information are identity information respectively distributed to the first device and the second device after the host system is powered on.
- 2. The method according to claim 1, wherein the method further comprises: Storing the first identity information into a target field corresponding to a first link control unit, wherein the first link control unit is a link control unit on the first device; in the process of performing link training between the first device and the second device, information exchange is performed between the first device and the second device based on the first identity information to obtain second identity information of the second device, including: Reading the first identity information from the target field through the first link control unit in the process of carrying out link training on the first device and the second device; And carrying out information exchange with the second device based on the first identity information through the first link control unit to obtain the second identity information of the second device.
- 3. The method of claim 2, wherein the target field comprises a device identification field for containing identification information of the first device.
- 4. The method according to claim 2, wherein the method further comprises: After the host system is powered on, the target field is configured in a dedicated register or an internal cache of the first link control unit in response to a configuration operation of a basic input output system BIOS program or a unified extensible firmware interface UEFI program.
- 5. The method according to claim 2, wherein said exchanging information with a second device by the first link control unit based on the first identity information, obtaining second identity information of the second device, comprises: Initiating a link training by the first link control unit to transmit a first link training frame to a second link control unit on the second device, the first link training frame including the first identity information, and And analyzing the received second link training frame by the first link control unit to obtain second identity information of the second device, wherein the second link training frame is sent by the second link control unit.
- 6. The method of claim 5, wherein the initiating, by the first link control unit, a link training to transmit a first link training frame to a second link control unit on the second device comprises: initiating link training by a first physical layer module on the first link control unit to transmit the first link training frame to a second physical layer module of a second link control unit on the second device; the parsing, by the first link control unit, the received second link training frame to obtain second identity information of the second device includes: and analyzing the received second link training frame through the first physical layer module to obtain second identity information of the second device, wherein the second link training frame is sent by the second physical layer module.
- 7. The method of claim 5, wherein the destination field further stores first link identification information for a link to be established by the first device with the second device, the method further comprising: Reading the first link identification information from the target field by the first link control unit; encapsulating the first link identification information in the first link training frame by the first link control unit, and And analyzing the received second link training frame through the first link control unit to obtain second link identification information of the second device.
- 8. The method of claim 5, wherein the destination field further stores first link identification information for a link to be established by the first device with the second device, the method further comprising: Reading the first link identification information from the target field by the first link control unit; transmitting a third link training frame to a second link control unit on the second device via the first link control unit, the third link training frame including the first link identification information, and And analyzing the received fourth link training frame by the first link control unit to obtain second link identification information of the second device, wherein the fourth link training frame is sent by the second link control unit on the second device.
- 9. The method of claim 5, wherein the first link training frame further comprises at least one of type information of the first device, vendor identification information of the first device, and rate capability of the first device.
- 10. The method of claim 5, wherein the method further comprises: Constructing the first link training frame based on a link training protocol by a first physical layer module on the first link control unit, or And constructing and transmitting the first link training frame in a non-data transmission period through a first physical layer module on the first link control unit.
- 11. The method according to any one of claims 1 to 10, wherein the first identity information comprises bus device function BDF information, the method further comprising: and after the host system is powered on, receiving the BDF information configured by the BIOS or UEFI program.
- 12. The method according to any one of claims 1 to 10, further comprising: and storing the second identity information of the second device into a link state register, a training state bit or a target field corresponding to a first link control unit on the first device, wherein the first link control unit is the link control unit on the first device.
- 13. The method according to any one of claims 1 to 10, wherein said feeding back said second identity information of said second device to said driver in response to a query operation of said driver comprises: and in response to an operation that the driver polls the port state of the first device when performing device detection, feeding back the second identity information of the second device to the driver.
- 14. The method of claim 13, wherein the feeding back the second identity information of the second device to the driver in response to the driver polling the port status of the first device while performing device probing comprises: and responding to the operation that the driver polls the port state of the first device when equipment detection is performed, and feeding back connected indication information to the driver, wherein the connected indication information is used for indicating that the first device is connected with remote equipment, and the connected remote equipment comprises the second device with second identity information.
- 15. The method according to any one of claims 1 to 10, wherein the second identity information is used to trigger the driver to determine whether the electrical connection between the first device and the second device is a valid connection based on a link state machine state, and to determine that the second identity information is valid if the electrical connection between the first device and the second device is a valid connection.
- 16. A first device, characterized in that the first device comprises a device discovery unit for performing the method according to any of claims 1 to 15.
- 17. A chip is characterized in that, the chip comprising the first device of claim 16.
- 18. An electronic device, characterized in that, the electronic device comprising the first device of claim 16.
Description
Identity information acquisition method, first device, chip and electronic equipment Technical Field The present application relates to the field of processors, and in particular, to a method for acquiring identity information, a first device, a chip, and an electronic device. Background Graphics processors are external physical devices that are connected to a Host (Host) system. In the related art, after the host system is powered on, a first driver of the first graphics processor is loaded, the first graphics processor is linked with the second graphics processor under the participation of the first driver, and after the linking is completed, the first driver can acquire the identity information of the second graphics processor connected with the first graphics processor. The related art knows that the identity information of the second graphic processor lags seriously. Disclosure of Invention The application provides an identity information acquisition method, a first device, a chip and electronic equipment, which are based on the identity information distributed to the equipment after a host system is electrified, and information exchange is carried out in the link training process, so that the identity information of the second device can be quickly inquired after the driver is loaded. According to an aspect of the present application, there is provided a method of acquiring identity information, which is performed by a first device that is an internal device of a host system or an external device connected to the host system, the method comprising the steps of. In the process of carrying out link training on the first device and the second device, carrying out information exchange on the basis of the first identity information and the second device to obtain second identity information of the second device; After a driver of the first device is loaded, responding to query operation of the driver, and feeding back the second identity information of the second device to the driver; The first identity information and the second identity information are identity information respectively distributed to the first device and the second device after the host system is powered on. According to one aspect of the present application there is provided a first device comprising a device discovery unit for performing the method as described above. According to one aspect of the present application there is provided a chip comprising a first device as described above. According to an aspect of the present application, there is provided an electronic device comprising a first device as described above. The technical scheme provided by the embodiment of the application has the beneficial effects that at least the following are included. In the embodiment of the application, the first identity information distributed to the first device after the host system is electrified is used, the first device exchanges information with the second device based on the first identity information in the link training process to obtain the second identity information of the second device, and then the driver of the first device can quickly inquire the second identity information of the second device after being loaded. Compared with the related art, the method and the device have the advantages that the second identity information of the second device can be obtained only after the driver is loaded and the complete chain establishment flow is needed, the device discovery process of the driver layer is the device discovery process of the power-on layer of the host system in advance, the second device electrically connected with the first device can be discovered more quickly after the driver is loaded, and the identity information of the second device can be queried more quickly. Drawings In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Fig. 1 is a flowchart of a method for acquiring identity information according to an embodiment of the present application. Fig. 2 is a flowchart of a method for acquiring identity information according to another embodiment of the present application. Fig. 3 is a schematic diagram of an identity information acquisition system according to an embodiment of the present application. Fig. 4 is a schematic diagram of an identity information acquisition system according to another embodiment of the present application. Fig. 5 is a block diagram of an electronic device according to an embodiment of the present application. Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present applica