CN116126613A - Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium - Google Patents

Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium Download PDF

Info

Publication number
CN116126613A
CN116126613A CN202310139021.0A CN202310139021A CN116126613A CN 116126613 A CN116126613 A CN 116126613A CN 202310139021 A CN202310139021 A CN 202310139021A CN 116126613 A CN116126613 A CN 116126613A
Authority
CN
China
Prior art keywords
expansion board
hardware expansion
board card
pcie
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310139021.0A
Other languages
Chinese (zh)
Inventor
张旭
杨磊
张海龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Publication of CN116126613A publication Critical patent/CN116126613A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a position detection method and device of PCIe equipment, electronic equipment and a storage medium. Comprising the following steps: detecting whether each hardware expansion board card has an accessed PCIe device currently or not, and obtaining a detection result; determining a hardware expansion board card currently accessed to PCIe equipment as a target hardware expansion board card by using a detection result; recording device position information of PCIe devices accessed by the target hardware expansion board card; and writing the equipment position information into the field replaceable unit of the target hardware expansion board card. The method and the device generate the device position information of the PCIe device accessed by the target hardware expansion board card, write the device position information into the field replaceable unit of the target hardware expansion board card, facilitate the subsequent reading of the field replaceable unit and the transmission of the device position information to the basic input and output system, and solve the problem that the position information of the PCIe device cannot be transmitted due to hardware limitation in the prior art.

Description

Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of device detection, and in particular, to a method and apparatus for detecting a position of a PCIe device, an electronic device, and a storage medium.
Background
The baseboard management controller can realize the functions of relevant control, information supervision and the like of the server, and is a platform for intuitively presenting server information. A user may access the baseboard management controller of the server through web, ipmitool, snmp tools, etc. to obtain server information.
The location information associated with each PCIe device by the current server is typically transferred to the baseboard management controller by the BIOS through a fixed protocol after power-on. However, the Genoa platform of AMD, due to the limitation of the CPU and hardware of the server, cannot know which positions are plugged with PCIE devices, and cannot scan and acquire device information in time, and then transmit the device information to the baseboard management controller.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides a position detection method and device of PCIe equipment, electronic equipment and a storage medium.
According to an aspect of the embodiments of the present application, there is provided a method for detecting a position of a PCIe device, applied to a baseboard management controller, the method including:
detecting whether each hardware expansion board card has an accessed PCIe device currently or not to obtain a detection result, wherein the hardware expansion board card is deployed on a server and is in communication connection with the baseboard management controller;
determining a hardware expansion board card currently accessed to PCIe equipment as a target hardware expansion board card by using the detection result;
recording the equipment position information of PCIe equipment accessed by the target hardware expansion board card;
and writing the equipment position information into a field replaceable unit of the target hardware expansion board card.
Further, the detecting whether each hardware expansion board card has an accessed PCIe device currently, to obtain a detection result includes:
detecting the current slave address of the hardware expansion board card by using a communication bus;
determining whether the hardware expansion board card has an accessed PCIe device currently based on the slave address, and obtaining the detection result;
further, the determining, based on the slave address, whether the hardware expansion board card currently has the accessed PCIe device, to obtain the detection result includes:
under the condition that the slave address is empty, the detection result is that the hardware expansion board card does not have PCIe equipment accessed currently;
and under the condition that the slave address is not null, the detection result is that the hardware expansion board card currently has the accessed PCIe equipment.
Further, the recording the device location information of the PCIe device accessed by the target hardware expansion board includes:
acquiring access information of the PCIe device;
and generating the equipment position information by using the access information.
Further, the obtaining the access information of the PCIe device includes:
scanning each central processing unit in the server in turn, a hardware expansion board card associated with the central processing unit and a transmission channel of each hardware expansion board card to obtain access information of the PCIe equipment;
wherein the access information includes: and the PCIe device is connected with a target transmission channel of the target hardware expansion board card.
Further, the generating the device location information using the access information includes:
acquiring a first identifier corresponding to the target central processing unit, a second identifier corresponding to the target hardware expansion board card, and a third identifier of a target transmission channel connected with the target hardware expansion board card by the PCIe device;
the device location information is generated based on the first identification, the second identification, and the third identification.
Further, the method further comprises:
receiving an IPMI command from a basic input output system;
reading device position information from field replaceable units of each hardware expansion board card in response to the IPMI command;
and sending the equipment position information to the basic input and output system.
According to another aspect of the embodiments of the present application, there is further provided a position detection apparatus of a PCIe device, including:
the detection module is used for detecting whether each hardware expansion board card has an accessed PCIe device currently or not to obtain a detection result, wherein the hardware expansion board card is deployed on a server and is in communication connection with the baseboard management controller;
the determining module is used for determining the hardware expansion board currently accessed to the PCIe equipment as a target hardware expansion board by utilizing the detection result;
the recording module is used for recording the equipment position information of PCIe equipment accessed by the target hardware expansion board card;
and the writing module is used for writing the equipment position information into the field replaceable unit of the target hardware expansion board card.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that performs the steps described above when running.
According to another aspect of the embodiments of the present application, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; and a processor for executing the steps of the method by running a program stored on the memory.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the target hardware expansion board card which is deployed in the server and accessed to the PCIe equipment is detected after the server is electrified by the baseboard management controller, meanwhile, the equipment position information of the PCIe equipment accessed to the target hardware expansion board card is generated, and the equipment position information is written into the field replaceable unit of the target hardware expansion board card, so that the subsequent reading of the field replaceable unit and the transmission of the equipment position information to the basic input and output system are facilitated, and the problem that the Genoa platform of AMD cannot transmit the position information of the PCIE equipment due to hardware limitation is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a method for detecting a position of a PCIe device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a PCIe device location detection provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 4 is a block diagram of a position detection apparatus of a PCIe device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments, the exemplary embodiments of the present application and the descriptions thereof are used to explain the present application and do not constitute undue limitations of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a position detection method and device of PCIe equipment, electronic equipment and a storage medium. The method provided by the embodiment of the invention can be applied to any needed electronic equipment, for example, the electronic equipment can be a server, a terminal and the like, is not particularly limited, and is convenient to describe and is called as the electronic equipment for short hereinafter.
According to an aspect of the embodiments of the present application, a method embodiment of a method for detecting a position of a PCIe device is provided. Fig. 1 is a flowchart of a method for detecting a position of a PCIe device according to an embodiment of the present application, where, as shown in fig. 1, the method includes:
step S11, detecting whether each hardware expansion board card has an accessed PCIe device currently or not, and obtaining a detection result, wherein the hardware expansion board card is deployed on a server and is in communication connection with a baseboard management controller.
The method provided by the embodiment of the application is applied to a baseboard management controller (Baseboard Management Controller, abbreviated as BMC) in the server, and the baseboard management controller can realize the functions of relevant control, information supervision and the like of the server, so that the method is a platform for intuitively presenting server information. The baseboard management controller is connected with a hardware expansion board card (Riser card) in the server by adopting an i2c link, the hardware expansion board card is connected with a central processing unit of the server, namely, one central processing unit is connected with at least one hardware expansion board card, one hardware expansion board card can be connected with a plurality of PCIe devices, in addition, EEPROM (electrically-powered-down not lost storage unit) is arranged on the hardware expansion board card, and data are stored through the EEPROM.
It should be noted that, the server uses a hardware expansion board card to implement PCIe device number expansion, and one hardware expansion board card may expand 3 transmission channels (channels), where each transmission Channel is connected to one PCIe device. Typically, a server may carry 4 hardware expansion boards, and may be collocated with a total of 12 PCIe devices. Based on this, in the embodiment of the present application, the baseboard management controller is in communication connection with the hardware expansion board card in the server, so that the baseboard management control is convenient to obtain the connection information of the hardware expansion board card of the server, that is, which central processing unit the hardware expansion board card is connected to, and which PCIe devices are connected to the hardware expansion board card. Finally, the baseboard management controller can display the position information (CPU serial number, riser serial number and Channel serial number) of each PCIe device, so that the customer can conveniently position the device.
In the embodiment of the application, detecting whether each hardware expansion board card has an accessed PCIe device currently or not to obtain a detection result, wherein the detection result comprises the following steps of A1-A2:
and step A1, detecting the current slave address of the hardware expansion board card by using a communication bus.
In this embodiment of the present application, the baseboard management controller detects the current slave address (slave address) of the hardware expansion board card by using the i2c communication bus, and detects that the slave addresses of different types of devices are different, and if the baseboard management controller detects the slave address of the hardware expansion board card by using the i2c communication bus, it can determine that the hardware expansion board card currently has an accessed PCIe device.
It should be noted that, the performance of the server is related to the PCIe device mounted in addition to the CPU, for example, the PCIe device such as a disk array (Redundant Arrays of Independent Disks, abbreviated as RAID), a graphics processor (Graphics Processing Unit, abbreviated as GPU), a network interface controller (network interface controller, abbreviated as NIC), a field programmable gate array (Field Programmable Gate Array, abbreviated as FPGA), a host bus adapter, and the like, and the addresses of the slaves of the different types of devices are different.
And step A2, determining whether the hardware expansion board card has the accessed PCIe equipment currently based on the slave address, and obtaining a detection result.
In the embodiment of the application, determining whether the hardware expansion board card has the accessed PCIe device currently based on the slave address, obtaining a detection result includes: and under the condition that the slave address is empty, the detection result is that the hardware expansion board card does not currently have the accessed PCIe equipment. Or if the slave address is not null, the detection result is that the hardware expansion board card currently has the accessed PCIe device.
It should be noted that, after the PCIe device accesses the hardware expansion board card through the transmission channel, the slave address is reported to the hardware expansion board card, so the baseboard management controller determines whether the PCIe device that is accessed exists in the hardware expansion board card by scanning the slave address. If the slave address is null, each transmission channel of the hardware expansion board card is not accessed to PCIe equipment currently, so that the detection result is that the hardware expansion board card is not accessed to PCIe equipment currently. If the slave address is not null, the transmission channel of the hardware expansion board card is accessed to PCIe equipment.
And step S12, determining the hardware expansion board card currently accessed to the PCIe device as a target hardware expansion board card by using the detection result.
In the embodiment of the present application, since at least one central processor is disposed in the server, and meanwhile, one central processor may be associated with a plurality of hardware expansion boards, the baseboard management controller may count a detection result of each hardware expansion board, and determine that the detection result is that the hardware expansion board currently accessed to the PCIe device is the target hardware expansion board. Therefore, subsequent positioning of PCIe devices accessed on the target hardware expansion board card is facilitated.
And S13, recording the device position information of PCIe devices accessed by the target hardware expansion board card.
In the embodiment of the application, the recording of the device location information of the PCIe device accessed by the target hardware expansion board card includes the following steps B1-B2:
and B1, acquiring access information of PCIe equipment.
In an embodiment of the present application, obtaining access information of a PCIe device includes: and scanning each central processor in the server, the hardware expansion boards associated with the central processor and the transmission channels of each hardware expansion board in sequence to obtain the access information of the PCIe equipment. Wherein, the access information includes: and the PCIe device is connected with the target transmission channel of the target hardware expansion board card.
In the embodiment of the application, since the baseboard management controller is connected with the hardware expansion board card, the central processing unit on which the target hardware expansion board card is deployed cannot be perceived, and the PCIe device accessed on which transmission channel of the target hardware expansion board card cannot be perceived. Therefore, in order to accurately position the relation between the PCIe equipment and the target hardware expansion board card, a thread is newly added in the baseboard management controller, and after the baseboard management controller determines the target hardware expansion board card, the baseboard management controller sequentially scans through the thread according to the sequence of the central processing unit, the hardware expansion board card and the transmission channel. And obtaining access information of the PCIe device. The access information includes: and the PCIe device is connected with the target transmission channel of the target hardware expansion board card.
As an example, as shown in fig. 2, the server is currently deployed with two central processing units, where the two central processing units are respectively CPU0 and CPU1, the hardware expansion board associated with CPU0 has Riser card 0 and Riser card 1, and the hardware expansion board associated with CPU1 has Riser card 2 and Riser card 3. And 3 transmission channels are respectively arranged on the Riser card 0, the Riser card 1, the Riser card 2 and the Riser card 3.
The detection result shows that PCIe devices are connected to the Riser card 1 and the Riser card 2, when the baseboard management controller scans, the CPU0 and the CPU1 are scanned first to obtain that the hardware expansion board associated with the CPU0 is provided with the Riser card 0 and the Riser card 1, the hardware expansion board associated with the CPU1 is provided with the Riser card 2 and the Riser card 3, and because PCIe devices are connected to the Riser card 1 and the Riser card 2, the baseboard management controller only needs to scan the transmission channels deployed by the Riser card 1 and the Riser card 2 to obtain that the transmission channels on the Riser card 1 and the Riser card 2 are connected with the PCIe devices. The target central processing unit included in the finally obtained access information is: CPU0 and CPU1, the target transmission channels are Channel0 and Channel1 of the Riser card 1, and Channel1 and Channel2 of the Riser card 2.
And step B2, generating device position information by using the access information.
In an embodiment of the present application, generating device location information using access information includes: acquiring a first identifier corresponding to a target central processing unit, a second identifier corresponding to a target hardware expansion board card, and a third identifier of a target transmission channel of a PCIe device connection target hardware expansion board card; the second identifier and the third identifier generate device location information based on the first identifier.
In this embodiment of the present application, the first identifier corresponding to the target central processing unit is the number of the target central processing unit, for example: 0, 1..n. The second identifier corresponding to the target hardware expansion board is the number of the target hardware expansion board, for example: 0, 1..m. The third identifier corresponding to the target transmission channel is the number of the target transmission channel, for example: 0, 1..p. And then the first mark, the second mark and the third mark are arranged according to the preset priority, so as to generate the equipment position information. The preset priority is that the priority of the central processing unit is larger than the priority of the hardware expansion board card, and the priority of the hardware expansion board card is larger than the priority of the transmission channel.
Step S14, writing the device position information into the field replaceable unit of the target hardware expansion board card.
In the embodiment of the application, after generating the device position information, the baseboard management controller writes the device position information into the EEPROM in the hardware expansion board card for storage. And the device position information can be conveniently and quickly read when the device position information is transmitted subsequently.
As one example, when the baseboard management controller scans for PCIe devices present on Riser card 0 of CPU0, device location information is generated: 00-00-01, and then writing the device position information into the EEPROM of the Riser card, wherein the writing content is 00-00-01. Wherein, the first group of numbers 00 represents CPU0, the second group of numbers 00 represents Riser card 0, the third group of numbers are expressed in hexadecimal, if 01 represents that Channel0 exists PCIe device, 02 represents that Channel1 exists PCIe device, 04 represents that Channel2 exists PCIe device, and 03 represents that Channel0 and Channel1 exist PCIe device. Thus, detailed location information of the PCIE device is obtained.
According to the method provided by the embodiment of the application, the target hardware expansion board card which is deployed in the server and accessed to the PCIe equipment is detected after the server is electrified by the baseboard management controller, meanwhile, the equipment position information of the PCIe equipment accessed to the target hardware expansion board card is generated, and the equipment position information is written into the field replaceable unit of the target hardware expansion board card, so that the subsequent reading of the field replaceable unit and the transmission of the equipment position information to the basic input and output system are facilitated, and the problem that the Genoa platform of AMD cannot transmit the position information of the PCIE equipment due to hardware limitation is solved.
In an embodiment of the present application, the method further comprises the following steps C1-C3:
step C1, receiving IPMI command from basic input/output system.
And step C2, in response to the IPMI command, reading the equipment position information from the field replaceable units of the hardware expansion boards.
And step C3, transmitting the equipment position information to the basic input and output system.
In this embodiment of the present application, after the server is powered on, the bios in the server sends an IPMI command to the baseboard management controller, where the IPMI command is as follows: get PCIE Param ipmitool raw 0x3c 0x51+ (Riser Number).
After the baseboard management controller responds to the IPMI command, the baseboard management controller and the hardware expansion boards are connected by adopting a communication bus, so that the baseboard management controller can directly read the equipment position information from each hardware expansion board and send the equipment position information to the basic input/output system.
The method provided by the embodiment of the application self-defines the IPMI command, realizes that the in-band and out-of-band PCIe device position information can be transmitted, and directly reads the content in the field replaceable unit of the Riser card and converts the content into data transmission. In addition, the basic input/output system sends the IPMI command to acquire the device position information of each Riser card associated PCIe device, and then presents the device position information in a Setup option to meet the requirements of clients.
Fig. 3 is a schematic diagram of a server according to an embodiment of the present application, as shown in fig. 3, where the server includes: the baseboard management controller 100, the basic input output system 200, a plurality of central controllers 300, and a hardware expansion board 400.
In this embodiment, the baseboard management controller 100 is connected to the basic input/output system 200, the baseboard management controller 100 is connected to the hardware expansion board 400 through a communication bus, the central processor 300 is connected to the hardware expansion board 400, and a plurality of transmission channels are disposed on the hardware expansion board, and each transmission channel is used for accessing PCIe devices.
The baseboard management controller 100 is configured to detect whether each hardware expansion board currently has an accessed PCIe device, and obtain a detection result; determining a hardware expansion board card currently accessed to PCIe equipment as a target hardware expansion board card by using a detection result; recording device position information of PCIe devices accessed by the target hardware expansion board card; and writing the equipment position information into the field replaceable unit of the target hardware expansion board card.
The bios 200 is configured to send an IPMI command to the baseboard management controller 100 after the server is powered on.
A baseboard management controller 100 for receiving IPMI commands from a basic input/output system; reading device position information from the field replaceable units of the respective hardware expansion boards in response to the IPMI command; the device location information is sent to the bios 200.
In the embodiment of the present application, the baseboard management controller 100 is configured to detect a current slave address of the hardware expansion board card by using a communication bus; determining whether the hardware expansion board card has the accessed PCIe equipment currently based on the slave address, and obtaining a detection result;
in this embodiment of the present application, the baseboard management controller 100 is configured to, when the slave address is empty, detect that the hardware expansion board card does not currently have an accessed PCIe device; and under the condition that the slave address is not null, the detection result is that the hardware expansion board card currently has the accessed PCIe equipment.
In the embodiment of the present application, the baseboard management controller 100 is configured to obtain access information of PCIe devices; device location information is generated using the access information.
In this embodiment of the present application, the baseboard management controller 100 is configured to sequentially scan each central processor in the server, a hardware expansion board card associated with the central processor, and a transmission channel of each hardware expansion board card, to obtain access information of PCIe devices; wherein, the access information includes: and the PCIe device is connected with the target transmission channel of the target hardware expansion board card.
In this embodiment of the present application, the baseboard management controller 100 is configured to obtain a first identifier corresponding to a target central processing unit, a second identifier corresponding to a target hardware expansion board, and a third identifier of a target transmission channel where PCIe devices are connected to the target hardware expansion board; the second identifier and the third identifier generate device location information based on the first identifier.
According to the embodiment of the application, the substrate management controller is utilized to detect the target hardware expansion board card which is deployed in the server and accessed to the PCIe equipment after the server is electrified, meanwhile, equipment position information of the PCIe equipment accessed by the target hardware expansion board card is generated, the equipment position information is written into the field replaceable unit of the target hardware expansion board card, the follow-up use of the IPMI command issued by the basic input output unit is facilitated, the equipment position information is read from the field replaceable unit, and the equipment position information is transmitted to the basic input output system, so that the problem that the Genoa platform of AMD cannot transmit the position information of the PCIE equipment due to hardware limitation is solved, and the operation and maintenance requirements of users are met.
Fig. 4 is a block diagram of a position detection apparatus for PCIe devices provided in an embodiment of the present application, where the apparatus may be implemented as part or all of an electronic device through software, hardware, or a combination of both. As shown in fig. 4, the apparatus includes:
the detection module 41 is configured to detect whether each hardware expansion board card currently has an accessed PCIe device, and obtain a detection result, where the hardware expansion board cards are deployed on the server and are connected with the baseboard management controller in a communication manner;
a determining module 42, configured to determine, according to the detection result, a hardware expansion board currently accessed to the PCIe device as a target hardware expansion board;
the recording module 43 is configured to record device location information of PCIe devices accessed by the target hardware expansion board card;
a writing module 44 for writing the device location information to the field replaceable unit of the target hardware expansion board.
In the embodiment of the present application, the detection module 41 is configured to detect, using a communication bus, a current slave address of the hardware expansion board card; determining whether the hardware expansion board card has the accessed PCIe equipment currently based on the slave address, and obtaining a detection result;
in this embodiment of the present application, the detection module 41 is configured to, when the slave address is null, detect that the hardware expansion board card does not currently have an accessed PCIe device; and under the condition that the slave address is not null, the detection result is that the hardware expansion board card currently has the accessed PCIe equipment.
In the embodiment of the present application, the recording module 43 is configured to obtain access information of the PCIe device; device location information is generated using the access information.
In this embodiment of the present application, the recording module 43 is configured to sequentially scan each central processor in the server, a hardware expansion board card associated with the central processor, and a transmission channel of each hardware expansion board card, to obtain access information of PCIe devices; wherein, the access information includes: and the PCIe device is connected with the target transmission channel of the target hardware expansion board card.
In this embodiment of the present application, the recording module 43 is configured to obtain a first identifier corresponding to the target central processing unit, a second identifier corresponding to the target hardware extension board card, and a third identifier of a target transmission channel connected to the target hardware extension board card by PCIe device connection; the second identifier and the third identifier generate device location information based on the first identifier.
In this embodiment of the present application, the position detection apparatus of the PCIe device further includes: the receiving module is used for receiving the IPMI command from the basic input/output system; reading device position information from the field replaceable units of the respective hardware expansion boards in response to the IPMI command; and sending the device position information to the basic input and output system.
The embodiment of the application provides a target hardware expansion board card which is deployed in a server and is accessed to PCIe equipment after the server is electrified by utilizing a baseboard management controller, equipment position information of the PCIe equipment accessed by the target hardware expansion board card is generated, and the equipment position information is written into a field replaceable unit of the target hardware expansion board card, so that the subsequent reading of the field replaceable unit and the transmission of the equipment position information to a basic input and output system are facilitated, and the problem that a Genoa platform of AMD cannot transmit the position information of the PCIE equipment due to hardware limitation is solved.
The embodiment of the application further provides an electronic device, as shown in fig. 5, the electronic device may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the above embodiments.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present application, a computer-readable storage medium is provided, where instructions are stored, which when executed on a computer, cause the computer to perform the method for detecting a position of a PCIe device according to any one of the above embodiments.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the method for detecting a position of a PCIe device as set forth in any one of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), etc.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.
The foregoing is merely a specific embodiment of the application to enable one skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for detecting a position of a PCIe device, applied to a baseboard management controller, the method comprising:
detecting whether each hardware expansion board card has an accessed PCIe device currently or not to obtain a detection result, wherein the hardware expansion board card is deployed on a server and is in communication connection with the baseboard management controller;
determining a hardware expansion board card currently accessed to PCIe equipment as a target hardware expansion board card by using the detection result;
recording the equipment position information of PCIe equipment accessed by the target hardware expansion board card;
and writing the equipment position information into a field replaceable unit of the target hardware expansion board card.
2. The method of claim 1, wherein the detecting whether each hardware expansion board has an accessed PCIe device currently includes:
detecting the current slave address of the hardware expansion board card by using a communication bus;
and determining whether the hardware expansion board card has the accessed PCIe equipment currently based on the slave address, and obtaining the detection result.
3. The method of claim 2, wherein the determining whether the hardware expansion board currently has an accessed PCIe device based on the slave address, obtaining the detection result, comprises:
under the condition that the slave address is empty, the detection result is that the hardware expansion board card does not have PCIe equipment accessed currently;
and under the condition that the slave address is not null, the detection result is that the hardware expansion board card currently has the accessed PCIe equipment.
4. The method of claim 1, wherein the recording device location information of the PCIe device to which the target hardware expansion board is connected comprises:
acquiring access information of the PCIe device;
and generating the equipment position information by using the access information.
5. The method of claim 4, wherein the obtaining access information for the PCIe device comprises:
scanning each central processing unit in the server in turn, a hardware expansion board card associated with the central processing unit and a transmission channel of each hardware expansion board card to obtain access information of the PCIe equipment;
wherein the access information includes: and the PCIe device is connected with a target transmission channel of the target hardware expansion board card.
6. The method of claim 4, wherein said generating said device location information using said access information comprises:
acquiring a first identifier corresponding to the target central processing unit, a second identifier corresponding to the target hardware expansion board card, and a third identifier of a target transmission channel connected with the target hardware expansion board card by the PCIe device;
the device location information is generated based on the first identification, the second identification, and the third identification.
7. The method according to claim 1, wherein the method further comprises:
receiving an IPMI command from a basic input output system;
reading device position information from field replaceable units of each hardware expansion board card in response to the IPMI command;
and sending the equipment position information to the basic input and output system.
8. A position detection apparatus for a PCIe device, comprising:
the detection module is used for detecting whether each hardware expansion board card has an accessed PCIe device currently or not to obtain a detection result, wherein the hardware expansion board card is deployed on a server and is in communication connection with the baseboard management controller;
the determining module is used for determining the hardware expansion board currently accessed to the PCIe equipment as a target hardware expansion board by utilizing the detection result;
the recording module is used for recording the equipment position information of PCIe equipment accessed by the target hardware expansion board card;
and the writing module is used for writing the equipment position information into the field replaceable unit of the target hardware expansion board card.
9. A storage medium comprising a stored program, wherein the program when run performs the method steps of any of the preceding claims 1 to 7.
10. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for executing the method steps of any one of claims 1 to 7 by running a program stored on a memory.
CN202310139021.0A 2023-01-12 2023-02-20 Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium Pending CN116126613A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN2023100636232 2023-01-12
CN202310063623 2023-01-12
CN202310132594 2023-02-17
CN2023101325940 2023-02-17

Publications (1)

Publication Number Publication Date
CN116126613A true CN116126613A (en) 2023-05-16

Family

ID=86306241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310139021.0A Pending CN116126613A (en) 2023-01-12 2023-02-20 Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116126613A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117435417A (en) * 2023-12-20 2024-01-23 苏州元脑智能科技有限公司 Device position determining method and device, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117435417A (en) * 2023-12-20 2024-01-23 苏州元脑智能科技有限公司 Device position determining method and device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
US11126352B2 (en) Method for using BMC as proxy NVMeoF discovery controller to provide NVM subsystems to host
US20240045816A1 (en) Self-configuring baseboard management controller (bmc)
US20210373778A1 (en) Method and apparatus for fine tuning and optimizing nvme-of ssds
USRE47289E1 (en) Server system and operation method thereof
CN102223394B (en) Methods and servers to provide remote direct access of solid-state storage
US20090024764A1 (en) Tracking The Physical Location Of A Server In A Data Center
US20070112984A1 (en) Sideband bus setting system and method thereof
US20080034122A1 (en) Apparatus and Method to Detect Miscabling in a Storage Area Network
US20140122753A1 (en) Electronic Device, Management Method Thereof, and Rack Serving System
US20230350831A1 (en) Bandwidth allocation method and apparatus for pcie external plug-in card, and device and storage medium
US20230412742A1 (en) Apparatus, method, and system for monitoring image-forming apparatus, and storage medium
CN116126613A (en) Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium
US8738816B2 (en) Management of detected devices coupled to a host machine
CN107818061B (en) Data bus and management bus for associated peripheral devices
US20220027300A1 (en) USB hub device having functionality of self firmware updating and host electronic system having the same
CN115509978A (en) Method, device, equipment and storage medium for determining physical position of external plug-in equipment
CN115454896A (en) SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium
US6941451B2 (en) Management subsystem and method for discovering management device functions
US10795848B2 (en) Dual way communication method, system, and master device thereof
US11847089B2 (en) Electronic device and method for sharing data lanes of a network interface device between two or more computing devices
US10509657B2 (en) Forced device reinitialization without mandatory restart
CN117118858A (en) Data acquisition method and device based on network protocol and acquisition card
CN114297120A (en) Bandwidth allocation method, device and system
CN115563039A (en) Method and device for processing data of multi-node server
CN115373749A (en) Method for identifying PCIE terminal equipment and computing equipment

Legal Events

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