Adapter card identification method and device, electronic equipment and computer readable storage medium
The automatic identification and bandwidth allocation of the riser card in the server is achieved through the substrate management controller, which solves the compatibility and management problems of different types of Riser cards in the prior art, and improves the flexibility and adaptability of IO expansion.
Patent Information
- Application Number
- CN202411833323.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-21
AI Technical Summary
In distributed servers, different types of Riser cards need to be adapted to meet IO expansion of different bandwidth requirements, but the existing technology lacks an automatic identification solution, cannot be compatible with different types of Riser cards, and it is difficult to realize the automatic identification and bandwidth allocation of Riser card models by BIOS.
The BIOS automatically recognizes the adapter card by the server through the substrate management controller (BMC). The method includes traversing the physical link information table of the adapter card to determine the target adapter card; determining the target serial number in the whitelist of the adapter card; reading the real serial number through the target storage medium channel; if the serial number is consistent, write static information to the preset storage medium for reading by the BIOS, and realizes automatic identification and bandwidth allocation of the adapter card.
It realizes automatic identification and bandwidth allocation of the riser card by BIOS in the server, improves the flexibility and adaptability of IO expansion, and ensures compatibility and management efficiency of different types of Riser cards.
Smart Images

Figure CN119668701A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a method for identifying an adapter card, and also to an adapter card identification device, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the development and application of cloud computing, the application of distributed servers is becoming more and more extensive, and the types of server configurations are becoming more and more diversified. Therefore, the requirements for server IO (Input / Output) expansion are becoming higher and higher. In order to meet the IO expansion with different bandwidth requirements, different types of riser cards (adapter cards) need to be adapted. In order to be compatible with different types of riser cards, an automatic riser card identification solution is required, which can not only meet the BMC's own management of the access devices on the riser card, but also provide the BIOS (Basic Input Output System) with the riser card model to allocate different bandwidths. Summary of the invention
[0003] The purpose of the present application is to provide an adapter card identification method, which can realize automatic identification of the adapter card by the BIOS in the server through a baseboard management controller; another purpose of the present application is to provide an adapter card identification device, an electronic device, a computer-readable storage medium and a computer program product, all of which have the above-mentioned beneficial effects.
[0004] In a first aspect, the present application provides an adapter card identification method, which is applied to a baseboard management controller, wherein the baseboard management controller is deployed on a server, wherein the server further includes a basic input / output system and a preset storage medium, wherein both the baseboard management controller and the basic input / output system are communicatively connected to the preset storage medium, and wherein the method includes:
[0005] Traverse the adapter card physical link information table to determine the target adapter card;
[0006] Determine the target serial number corresponding to the target adapter card in the adapter card whitelist;
[0007] Determine the target storage medium channel corresponding to the target serial number in the adapter card static information table;
[0008] Reading the real serial number of the target adapter card through the target storage medium channel;
[0009] If the real serial number is consistent with the target serial number, the target static information corresponding to the target serial number in the adapter card static information table is written into the preset storage medium for reading by the basic input and output system, thereby enabling the basic input and output system to identify the target adapter card.
[0010] Optionally, obtaining the real serial number of the target adapter card by reading through the target storage medium channel includes:
[0011] Reading the field replaceable unit information of the target adapter card from the storage medium of the target adapter card through the target storage medium channel;
[0012] The field replaceable unit information is parsed to obtain the real serial number of the target adapter card.
[0013] Optionally, if the real serial number is consistent with the target serial number, writing the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system to identify the target adapter card, including:
[0014] If the real serial number is consistent with the target serial number, obtaining the adapter card type corresponding to the target serial number in the adapter card static information table;
[0015] Determine the target storage partition of the adapter card type in the preset storage medium according to a preset mapping relationship; wherein the preset mapping relationship is a mapping relationship between the adapter card type and the adapter card static information storage partition;
[0016] Writing the target static information corresponding to the target serial number in the adapter card static information table into the target storage partition in the preset storage medium, so that the basic input and output system can read the target static information in the target storage partition, thereby realizing the basic input and output system's identification of the target adapter card;
[0017] Accordingly, the method further comprises:
[0018] If the real serial number is inconsistent with the target serial number, the process returns to the step of traversing the adapter card physical link information table to determine the next target adapter card.
[0019] Optionally, writing the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system identifying the target adapter card, comprises:
[0020] The target static information corresponding to the target serial number in the adapter card static information table is written into the preset storage medium, so that the basic input and output system calls the interface command of the baseboard management controller to read the preset storage medium, thereby realizing the basic input and output system's identification of the target adapter card.
[0021] Optionally, writing the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system identifying the target adapter card, comprises:
[0022] The target static information corresponding to the target serial number in the adapter card static information table is written into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system to identify the target adapter card, and allocate bandwidth to the target adapter card according to the target static information of the target adapter card.
[0023] Optionally, the adapter card identification method further includes:
[0024] Traversing the adapter card physical link information table to obtain the physical link information of each adapter card in the server;
[0025] Physical link switching is performed according to the physical link information of the adapter card to access the connection device of the adapter card.
[0026] Optionally, the adapter card identification method further includes:
[0027] When receiving a motherboard replacement prompt, determining a new storage medium on the target motherboard according to the motherboard replacement prompt;
[0028] Return to the step of traversing the adapter card physical link information table to determine the target adapter card, so as to write the static information of each adapter card in the server into the new preset storage medium.
[0029] In a second aspect, the present application further discloses an adapter card identification device, which is applied to a baseboard management controller, wherein the baseboard management controller is deployed on a server, wherein the server further includes a basic input / output system and a preset storage medium, wherein both the baseboard management controller and the basic input / output system are communicatively connected to the preset storage medium, and wherein the device includes:
[0030] A traversal module, used to traverse the physical link information table of the adapter card to determine the target adapter card;
[0031] A first determination module, configured to determine a target serial number corresponding to the target adapter card in the adapter card whitelist;
[0032] A second determination module is used to determine the target storage medium channel corresponding to the target serial number in the adapter card static information table;
[0033] A reading module, used for reading the real serial number of the target adapter card through the target storage medium channel;
[0034] The identification module is used to write the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium if the real serial number is consistent with the target serial number, so as to be read by the basic input and output system, thereby realizing the basic input and output system's identification of the target adapter card.
[0035] In a third aspect, the present application further discloses an electronic device, comprising:
[0036] Memory for storing computer programs;
[0037] The processor is used to implement the steps of any one of the adapter card identification methods described above when executing the computer program.
[0038] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the adapter card identification methods described above are implemented.
[0039] In a fifth aspect, the present invention further discloses a computer program product, including a computer program / instruction, which implements the steps of any of the adapter card identification methods described above when executed by a processor.
[0040] The present application provides an adapter card identification method, which is applied to a baseboard management controller, wherein the baseboard management controller is deployed on a server, and the server also includes a basic input / output system and a preset storage medium, wherein the baseboard management controller and the basic input / output system are both communicatively connected to the preset storage medium, and the method includes: traversing an adapter card physical link information table to determine a target adapter card; determining a target serial number corresponding to the target adapter card in an adapter card whitelist; determining a target storage medium channel corresponding to the target serial number in an adapter card static information table; obtaining a real serial number of the target adapter card by reading through the target storage medium channel; if the real serial number is consistent with the target serial number, writing the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium for reading by the basic input / output system, thereby realizing identification of the target adapter card by the basic input / output system.
[0041] By applying the technical solution provided by the present application, a whitelist of adapter cards is pre-created in the server to store the serial numbers of each adapter card that has been adapted in the server. On this basis, the baseboard management controller determines each adapter card that needs to be identified in the server by traversing the physical link information table of the adapter card in the server. For any target adapter card, its corresponding target static information can be queried in the server's adapter card static information table according to its target serial number in the whitelist of adapter cards; and in order to ensure the accuracy of the adapter card identification result, the target adapter card is further read according to the target storage medium channel in the adapter card static information table to verify the target serial number. Obviously, when the two values are consistent, the accuracy of the target static information can be guaranteed. Therefore, it is written into the preset storage medium for the basic input and output system to read, and the basic input and output system can realize the automatic identification of the target adapter card. It can be seen that the present technical solution realizes the automatic identification of the adapter card by the basic input and output system in the server through the baseboard management controller, and has high accuracy.
[0042] In one embodiment of the present application, in a scenario where a mainboard failure occurs and the mainboard needs to be replaced, after the mainboard replacement is completed, the new storage medium on the newly replaced mainboard can be determined first, and the step of traversing the physical link information table of the adapter card can be returned to obtain the static information of each adapter card in the server and write it into the new storage medium for the basic input and output system to read and identify. It can be seen that the present technical solution realizes the automatic identification of the adapter card by the basic input and output system in the scenario of replacing the mainboard in the server.
[0043] The adapter card identification device, electronic device, computer-readable storage medium and computer program product provided in this application also have the above-mentioned technical effects, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.
[0045] Figure 1 A schematic diagram of the structure of a server provided for this application;
[0046] Figure 2 A schematic diagram of a flow chart of an adapter card identification method provided in this application;
[0047] Figure 3 A physical link topology diagram between a baseboard management controller and an adapter card provided in this application;
[0048] Figure 4 A schematic diagram of the division of storage partitions in a preset storage medium provided in this application;
[0049] Figure 5 A timing diagram of an adapter card identification method provided by the present application;
[0050] Figure 6 A schematic diagram of the structure of an adapter card identification device provided in this application;
[0051] Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0052] The core of the present application is to provide an adapter card identification method, which can realize automatic identification of the adapter card by the BIOS in the server through a baseboard management controller; another core of the present application is to provide an adapter card identification device, an electronic device, a computer-readable storage medium and a computer program product, all of which have the above-mentioned beneficial effects.
[0053] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0054] An embodiment of the present application provides a method for identifying an adapter card.
[0055] First, please refer to Figure 1 , Figure 1 The present invention provides a structural diagram of a server, which includes a baseboard management controller, a basic input and output system, and a preset storage medium, wherein the baseboard management controller and the basic input and output system are both in communication connection with the preset storage medium. The swivel card identification method provided in the embodiment of the present invention is implemented based on the server.
[0056] For further information, please refer to Figure 2 , Figure 2 A schematic diagram of a flow chart of an adapter card identification method provided in this application, the adapter card identification method is applied to Figure 1 The baseboard management controller shown may include the following S101 to S105.
[0057] S101: traverse the adapter card physical link information table to determine a target adapter card.
[0058] This step is intended to determine the target adapter card, which is the adapter card to be identified. It should be noted that the adapter card identification here refers to the automatic identification of the adapter card by the basic input-output system in the server. It can be understood that the physical link topology of each internal component of the server is fixed when it leaves the factory, that is, the physical link topology of each adapter card in the server is fixed, and is recorded through the corresponding physical link information table. Therefore, by traversing the adapter card physical link information table, the various adapter cards existing in the server can be determined, so that the basic input-output system can automatically identify each adapter card by continuing to execute subsequent steps. Therefore, the target adapter card is any adapter card in the server, specifically the first adapter card traversed from the adapter card physical link information table.
[0059] As mentioned above, the physical link information table of the adapter card in the server is used to record the physical link topology of each adapter card in the server. Figure 3 , Figure 3 A physical link topology diagram between a baseboard management controller and an adapter card provided in this application, such as Figure 3 As shown, there are two ways to connect the adapter card and the I2C (Inter-Integrated Circuit, I2C bus) controller in design. One is to connect directly to the I2C controller through the I2C line, such as RiserA and RiserB. In this connection mode, the baseboard management controller can directly communicate with the adapter card through the I2C protocol. The other is that the adapter card is connected to the I2C controller through an I2C switch (I2C converter), such as RiserC. In this connection mode, the baseboard management controller must first switch to the I2C switch channel where the adapter card is located before communicating with the adapter card through the I2C protocol. In the server, the two connection methods can coexist. It can be determined that the specific content of the adapter card physical link information table may include but is not limited to the area where each adapter card is located, the I2C bus number used for communication, the upper-level I2C switch address, the upper-level I2C switch channel number, the internal I2C switch address and other information.
[0060] S102: Determine a target serial number corresponding to a target adapter card in the adapter card whitelist.
[0061] This step is intended to determine the target serial number corresponding to the target adapter card, and the process can be implemented based on the adapter card whitelist. Specifically, an adapter card whitelist can be pre-created in the server, and the adapter card whitelist is used to store the serial numbers of each adapter card that has been adapted in the server. Then, after determining the target adapter card to be identified based on S101, the target serial number of the target adapter card can be queried in the adapter card whitelist. In a possible implementation, the serial number of the adapter card can be specifically a PN number (Pseudorandom Noise, a pseudo-random or pseudo-noise code sequence, a commonly used address code), which is unique.
[0062] S103: Determine the target storage medium channel corresponding to the target serial number in the adapter card static information table.
[0063] This step aims to determine the target storage medium channel corresponding to the target adapter card. This process can be implemented based on the adapter card static information table, where the adapter card static information table is used to record the static information of each adapter card in the server, which may include but is not limited to the serial number of each adapter card, the I2C switch address, the storage medium (such as EEPROM, Electrically Erasable Programmable Read-Only Memory) address on the adapter card, the I2C switch channel number connected to the storage medium, etc. Therefore, by matching the adapter card static information, the target storage medium channel corresponding to the target serial number can be determined.
[0064] It should be noted that the target storage medium channel here refers to the communication channel of the storage medium deployed on the adapter card. The storage medium deployed on the adapter card is different from the above-mentioned preset storage medium. The preset storage medium is a storage medium deployed in the server and used to store static information of all adapter cards in the server. It is independent of the adapter card, while the storage medium deployed on the adapter card is only used to store relevant information of the corresponding adapter card. Of course, the two types can be the same, such as EEPROM.
[0065] S104: Obtain the real serial number of the target adapter card through the target storage medium channel.
[0066] This step aims to obtain the real serial number of the target adapter card. Specifically, after determining the target storage medium channel, the channel can be switched to the target storage medium channel, and the storage medium in the target adapter card can be read through the target storage medium channel to obtain the real serial number of the target adapter card.
[0067] In one embodiment of the present application, obtaining the real serial number of the target adapter card through the target storage medium channel may include:
[0068] Reading the field replaceable unit information of the target adapter card from the storage medium of the target adapter card through the target storage medium channel;
[0069] Parse the field replaceable unit information to obtain the real serial number of the target adapter card.
[0070] The embodiment of the present application provides a method for realizing the real serial number of the target adapter card, that is, the real serial number of the target adapter card is obtained by parsing the Fru (Field Replace Unit) information in the storage medium of the target adapter card. The Fru information records the detailed information of each replaceable unit, including model, serial number, manufacturer, production date, etc.
[0071] S105: If the real serial number is consistent with the target serial number, write the target static information corresponding to the target serial number in the static information table of the adapter card into a preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system to identify the target adapter card.
[0072] This step is intended to implement the correctness check of the serial number to effectively ensure the accuracy of the adapter card identification result. Specifically, when the real serial number of the target adapter card is consistent with the target serial number, it can be determined that the correctness check of the serial number has passed, and thus, the target static information corresponding to the target serial number in the adapter card static information table can be written into the preset storage medium (because the correctness check of the serial number has passed, it can be effectively guaranteed that the target static information at this time is the accurate static information of the target adapter card). On this basis, when the static information of all adapter cards in the server is acquired and stored, the basic input and output system in the server can realize automatic adapter card identification by reading the static information of each adapter card in the preset storage medium. In addition, when the real serial number is inconsistent with the target serial number, it means that the correctness check of the adapter card serial number has not passed, which means that the target static information corresponding to the target serial number at this time is inaccurate information, and it is no longer necessary to store it in the preset storage medium.
[0073] In one embodiment of the present application, if the real serial number is consistent with the target serial number, the target static information corresponding to the target serial number in the static information table of the adapter card is written into a preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system to identify the target adapter card, which may include:
[0074] If the real serial number is consistent with the target serial number, the adapter card type corresponding to the target serial number is obtained from the adapter card static information table;
[0075] Determine the target storage partition of the adapter card type in the preset storage medium according to the preset mapping relationship; wherein the preset mapping relationship is the mapping relationship between the adapter card type and the adapter card static information storage partition;
[0076] Write the target static information corresponding to the target serial number in the static information table of the adapter card into the target storage partition in the preset storage medium, so that the basic input and output system can read the target static information in the target storage partition to realize the basic input and output system to identify the target adapter card;
[0077] Accordingly, the adapter card identification method may further include:
[0078] If the real serial number is inconsistent with the target serial number, the process returns to the step of traversing the physical link information table of the adapter card to determine the next target adapter card.
[0079] Specifically, for the preset storage medium, it can be divided into regions to realize that different storage partitions correspond to the static information of different types of adapter cards, thereby establishing a mapping relationship between the adapter card type and the adapter card static information storage partition, that is, the above-mentioned preset mapping relationship. Therefore, after obtaining the accurate target static information of the target adapter card, the type information of the target adapter card can be extracted from the target static information, that is, the adapter card type of the target adapter card is determined, and the target static information is written into the target storage partition corresponding to the adapter card type for storage with reference to the above-mentioned preset mapping relationship. On this basis, the basic input and output system can realize the acquisition of the adapter card static information by reading each storage partition of the preset storage medium, and then realize the adapter card identification. Of course, when the accurate target static information of the target adapter card cannot be obtained (that is, when the real serial number is inconsistent with the target serial number), the next target adapter card can be traversed for identification until all the adapter cards in the server are identified.
[0080] Furthermore, the target static information corresponding to the target serial number in the static information table of the adapter card is written into a preset storage medium for reading by a basic input / output system, thereby realizing the basic input / output system's identification of the target adapter card. This may include: writing the target static information corresponding to the target serial number in the static information table of the adapter card into a preset storage medium, thereby realizing the basic input / output system's identification of the target adapter card by calling an interface command of a baseboard management controller.
[0081] In addition, writing the target static information corresponding to the target serial number in the static information table of the adapter card into a preset storage medium for the basic input / output system to read, so as to realize the basic input / output system to identify the target adapter card may include: writing the target static information corresponding to the target serial number in the static information table of the adapter card into a preset storage medium for the basic input / output system to read, so as to realize the basic input / output system to identify the target adapter card, and allocating bandwidth to the target adapter card according to the target static information of the target adapter card.
[0082] The above-mentioned application embodiment provides an implementation method for the basic input-output system to automatically identify the adapter card. Specifically, the basic input-output system can perform a read operation by calling the relevant interface command of the baseboard management controller to obtain the static information of each adapter card in the preset storage medium, thereby realizing automatic identification of the adapter card. As a result, the basic input-output system can allocate bandwidth to the corresponding adapter card according to the static information of the adapter card, that is, to implement bandwidth allocation according to the adapter card type. It can be understood that different types of adapter cards need to use different network bandwidths, and this process can be implemented according to the corresponding relationship between the adapter card type and the network bandwidth. Among them, in a possible implementation method, the interface command provided by the baseboard management controller can specifically be an IPMI (Intelligent Platform Management Interface) command.
[0083] It can be seen that the adapter card identification method provided by the embodiment of the present application pre-creates an adapter card whitelist in the server for storing the serial numbers of each adapter card that has been adapted in the server. On this basis, the baseboard management controller determines each adapter card that needs to be identified in the server by traversing the adapter card physical link information table in the server. For any target adapter card, its corresponding target static information can be queried in the server's adapter card static information table according to its target serial number in the adapter card whitelist; and in order to ensure the accuracy of the adapter card identification result, it is further read according to the target storage medium channel of the target adapter card in the adapter card static information table to obtain the real serial number of the target adapter card, so as to realize the verification of the target serial number. Obviously, when the values of the two are consistent, the accuracy of the target static information can be guaranteed. Therefore, it is written into the preset storage medium for the basic input and output system to read, and the basic input and output system can realize the automatic identification of the target adapter card. It can be seen that the technical solution realizes the automatic identification of the adapter card by the basic input and output system in the server through the baseboard management controller, and has high accuracy.
[0084] Based on the above embodiments:
[0085] In one embodiment of the present application, the adapter card identification method may further include:
[0086] Traverse the adapter card physical link information table to obtain the physical link information of each adapter card in the server;
[0087] Physical link switching is performed according to the physical link information of the adapter card to achieve access to the connected device of the adapter card.
[0088] The adapter card identification method provided in the embodiment of the present application can not only realize the automatic identification of the adapter card in the server by the basic input and output system, but also further realize the active access of the basic management controller to the device connected to the adapter card. As mentioned above, the adapter card physical link information table in the server is used to record the physical link topology of each adapter card in the server. Therefore, by switching the physical link, the access and control of the corresponding adapter card connected device can be realized.
[0089] In one embodiment of the present application, the adapter card identification method may further include:
[0090] When receiving a motherboard replacement prompt, determining a new storage medium on the target motherboard according to the motherboard replacement prompt;
[0091] Return to the step of traversing the adapter card physical link information table to determine the target adapter card, so as to write the static information of each adapter card in the server into a new preset storage medium.
[0092] The adapter card identification method provided in the embodiment of the present application can further realize the automatic identification of the adapter card by the basic input-output system in the scenario of replacing the mainboard in the server. Specifically, for the scenario where a mainboard failure occurs and the mainboard needs to be replaced, after the mainboard replacement is completed, the new storage medium on the newly replaced mainboard can be determined first, and the step of traversing the physical link information table of the adapter card can be returned to obtain the static information of each adapter card in the server and write it into the new storage medium for the basic input-output system to read and identify. It can be seen that the present technical solution realizes the automatic identification of the adapter card by the basic input-output system in the scenario of replacing the mainboard in the server.
[0093] In one embodiment of the present application, the adapter card identification method may further include:
[0094] When receiving a prompt for adding an adapter card, determine the newly added adapter card according to the prompt for adding the adapter card, and obtain the serial number of the newly added adapter card;
[0095] Add the serial number of the newly added riser card to the riser card whitelist.
[0096] The adapter card identification method provided in the embodiment of the present application can further realize the automatic identification of newly added adapter cards. Specifically, when a new adapter card is connected to the server, a corresponding adapter card addition prompt will be received. Therefore, the newly added adapter card can be determined according to the adapter card addition prompt, and the serial number of the newly added adapter card can be obtained at the same time. On this basis, the serial number of the newly added adapter card can be directly added to the adapter card whitelist, so that the basic management controller can realize the automatic identification of the newly added adapter card by executing S101 to S105. It can be seen that the embodiment of the present application effectively increases the scalability of adaptation by maintaining the adapted adapter cards in the server through the adapter card whitelist.
[0097] Based on the above embodiments, an embodiment of the present application provides another adapter card identification method.
[0098] First, please refer to Figure 4 , Figure 4 A schematic diagram of the division of storage partitions in a preset storage medium provided in this application, such as Figure 4 As shown in the figure, the riser cards in area A, area B, area C, and area D are stored in the EEPROM with offset addresses (offset). Each type occupies one byte of space. The offset address stores the type of the riser card in area A, the offset+1 address stores the type of the riser card in area B, the offset+2 address stores the type of the riser card in area C, and the offset+3 address stores the type of the riser card in area D.
[0099] For further information, please refer to Figure 5 , Figure 5 This is a timing diagram of a method for identifying an adapter card provided in this application, and its implementation process is as follows:
[0100] 1. The BMC (Baseboard Manager Controller) initializes the physical topology information of the riser card at startup, and then traverses the riser card physical link information table, which describes in detail the area where the riser card is located, the I2C bus number used for communication, the address of the upper I2C switch of the riser card, the channel number of the upper I2C switch of the riser card, the address of the I2C switch on the riser card, and saves the physical topology information of the riser card to the shared memory. For example, please refer to Table 1, which is a riser card physical link information table provided by this application.
[0101] Table 1 A riser card physical link information table
[0102]
[0103] It should be noted that in the server rear window view, there are four areas from left to right, namely area A, area B, area C, and area D. Riser cards may be placed in these four areas.
[0104] 2. If the I2C bus number in Table 1 is not 0xFF, the upper I2C switch address of the riser card is not 0x, and the upper I2C switch channel number of the riser card is not 0xFF, it means that the riser card in this area is connected to the I2C controller through the upper I2C switch, and the channel is switched according to the configured I2C switch address and channel number. At this point, the BMC can access the device connected to the riser card normally.
[0105] 3. Traverse the riser card whitelist, which contains all the riser card types that have been adapted to the server. The whitelist stores the PN number of the riser card, which can uniquely identify the type of a riser card.
[0106] 4. By matching the Riser card PN number in the whitelist with the Riser card static information table, you can get the static information of the Riser card itself, including the I2C switch address on the Riser card, the EEPROM address of the Riser card, the I2C switch channel number connected to the EEPROM on the Riser card, etc. Among them, the EEPROM mainly stores the Riser card Fru information, such as the Riser PN number, manufacturer, serial number, etc. For example, please refer to Table 2, which is a Riser card static information table provided by this application.
[0107] Table 2 A riser card static information table
[0108]
[0109] 5. Switch the EEPROM channel of the riser card according to the static information of the riser card. Now, the BMC can access the EEPROM information on the riser normally.
[0110] 6. Read the Fru information of the riser card stored in the EEPROM, parse the riser card PN number, and compare it with the riser PN number in the whitelist. If they are equal, it means that the riser card is successfully identified, and the EEPROM address of the corresponding area is found according to the riser card area offset value, such as Figure 4 As shown, the identified Riser card type RiserType is written into the EEPROM of the server for storage; if they are not equal, the Riser cards in other areas are traversed until all the Riser cards in the server are matched.
[0111] 7. During the BIOS startup process, it can call the IPMI command provided by the BMC to obtain the riser card type of the specified area from the BMC. The BMC obtains the riser card type of the specified area from the EEPROM and returns it to the BIOS. The BIOS allocates different bandwidths to different riser card connection devices according to the obtained riser card type.
[0112] It can be seen that the adapter card identification method provided by the embodiment of the present application pre-creates an adapter card whitelist in the server for storing the serial numbers of each adapter card that has been adapted in the server. On this basis, the baseboard management controller determines each adapter card that needs to be identified in the server by traversing the adapter card physical link information table in the server. For any target adapter card, its corresponding target static information can be queried in the server's adapter card static information table according to its target serial number in the adapter card whitelist; and in order to ensure the accuracy of the adapter card identification result, it is further read according to the target storage medium channel of the target adapter card in the adapter card static information table to obtain the real serial number of the target adapter card, so as to realize the verification of the target serial number. Obviously, when the values of the two are consistent, the accuracy of the target static information can be guaranteed. Therefore, it is written into the preset storage medium for the basic input and output system to read, and the basic input and output system can realize the automatic identification of the target adapter card. It can be seen that the technical solution realizes the automatic identification of the adapter card by the basic input and output system in the server through the baseboard management controller, and has high accuracy.
[0113] An embodiment of the present application provides a device for identifying an adapter card.
[0114] Please refer to Figure 6 , Figure 6 This is a structural schematic diagram of an adapter card identification device provided by the present application. The adapter card identification device is applied to a baseboard management controller, and the baseboard management controller is deployed on a server. The server also includes a basic input and output system and a preset storage medium. The baseboard management controller and the basic input and output system are both communicatively connected with the preset storage medium. The adapter card identification device may include:
[0115] A traversal module 1 is used to traverse the adapter card physical link information table to determine the target adapter card;
[0116] A first determination module 2, used to determine a target serial number corresponding to a target adapter card in an adapter card whitelist;
[0117] A second determination module 3, used to determine the target storage medium channel corresponding to the target serial number in the adapter card static information table;
[0118] A reading module 4 is used to read the real serial number of the target adapter card through the target storage medium channel;
[0119] The identification module 5 is used to write the target static information corresponding to the target serial number in the static information table of the adapter card into a preset storage medium if the real serial number is consistent with the target serial number, so as to be read by the basic input and output system, thereby realizing the basic input and output system's identification of the target adapter card.
[0120] It can be seen that the adapter card identification device provided in the embodiment of the present application pre-creates an adapter card whitelist in the server for storing the serial numbers of each adapter card that has been adapted in the server. On this basis, the baseboard management controller determines each adapter card that needs to be identified in the server by traversing the adapter card physical link information table in the server. For any target adapter card, its corresponding target static information can be queried in the server's adapter card static information table according to its target serial number in the adapter card whitelist; and in order to ensure the accuracy of the adapter card identification result, it is further read according to the target storage medium channel of the target adapter card in the adapter card static information table to obtain the real serial number of the target adapter card, so as to realize the verification of the target serial number. Obviously, when the values of the two are consistent, the accuracy of the target static information can be guaranteed. Therefore, it is written into the preset storage medium for the basic input and output system to read, and the basic input and output system can realize the automatic identification of the target adapter card. It can be seen that the technical solution realizes the automatic identification of the adapter card by the basic input and output system in the server through the baseboard management controller, and has high accuracy.
[0121] In one embodiment of the present application, the above-mentioned reading module 4 can be specifically used to read the field replaceable unit information of the target adapter card in the storage medium of the target adapter card through the target storage medium channel; parse the field replaceable unit information to obtain the real serial number of the target adapter card.
[0122] In one embodiment of the present application, the identification module 5 can be specifically used to obtain the adapter card type corresponding to the target serial number in the adapter card static information table if the real serial number is consistent with the target serial number; determine the target storage partition of the adapter card type in the preset storage medium according to the preset mapping relationship; wherein the preset mapping relationship is the mapping relationship between the adapter card type and the adapter card static information storage partition; write the target static information corresponding to the target serial number in the adapter card static information table into the target storage partition in the preset storage medium, so that the basic input and output system can read the target static information in the target storage partition, thereby realizing the basic input and output system's identification of the target adapter card;
[0123] Correspondingly, the adapter card identification device may further include a loop module, which is used to return to the step of traversing the adapter card physical link information table to determine the next target adapter card if the real serial number is inconsistent with the target serial number.
[0124] In one embodiment of the present application, the above-mentioned identification module 5 can be specifically used to write the target static information corresponding to the target serial number in the adapter card static information table into a preset storage medium, so that the basic input and output system can call the interface command of the baseboard management controller to read the preset storage medium, thereby realizing the basic input and output system's identification of the target adapter card.
[0125] In one embodiment of the present application, the above-mentioned identification module 5 can be specifically used to write the target static information corresponding to the target serial number in the adapter card static information table into a preset storage medium for reading by the basic input and output system, thereby realizing the basic input and output system's identification of the target adapter card, and allocating bandwidth to the target adapter card according to the target static information of the target adapter card.
[0126] In one embodiment of the present application, the adapter card identification device may also include an access module for traversing the adapter card physical link information table to obtain the physical link information of each adapter card in the server; performing physical link switching according to the physical link information of the adapter card to achieve access to the connection device of the adapter card.
[0127] In one embodiment of the present application, the adapter card identification device may also include a transfer module, which is used to determine the new storage medium on the target mainboard according to the mainboard replacement prompt when a mainboard replacement prompt is received; return to the step of traversing the adapter card physical link information table to determine the target adapter card, so as to write the static information of each adapter card in the server into the new preset storage medium.
[0128] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0129] An embodiment of the present application provides an electronic device.
[0130] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:
[0131] A memory 11, used for storing computer programs;
[0132] The processor 10 can implement the steps of any one of the above-mentioned adapter card identification methods when executing a computer program.
[0133] like Figure 7, which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.
[0134] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.
[0135] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in the embodiment of the adapter card identification method.
[0136] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:
[0137] Traverse the adapter card physical link information table to determine the target adapter card;
[0138] Determine the target serial number corresponding to the target adapter card in the adapter card whitelist;
[0139] Determine the target storage medium channel corresponding to the target serial number in the adapter card static information table;
[0140] Obtaining the real serial number of the target adapter card by reading through the target storage medium channel;
[0141] If the real serial number is consistent with the target serial number, the target static information corresponding to the target serial number in the adapter card static information table is written into a preset storage medium for BIOS to read, thereby enabling the BIOS to identify the target adapter card.
[0142] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0143] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0144] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.
[0145] Of course, it should be noted that Figure 7The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 7 More or fewer components than shown, or combinations of certain components.
[0146] An embodiment of the present application provides a computer-readable storage medium.
[0147] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned adapter card identification methods can be implemented.
[0148] Among them, the computer-readable storage medium can be any available medium that can be stored in a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, it can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk) and other media that can store computer program codes.
[0149] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0150] An embodiment of the present application provides a computer program product.
[0151] The computer program product provided in the embodiments of the present application includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of any of the above-mentioned adapter card identification methods can be implemented.
[0152] Specifically, in the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product.
[0153] Among them, the computer program product may include one or more computer programs / instructions, and when the computer program / instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application may be generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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, computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0154] For an introduction to the computer program product provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0155] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0156] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0157] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0158] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A method for identifying an adapter card, characterized in that: Applied to a baseboard management controller, the baseboard management controller is deployed on a server, the server also includes a basic input and output system and a preset storage medium, the baseboard management controller and the basic input and output system are both communicatively connected with the preset storage medium, the method includes: Traverse the adapter card physical link information table to determine the target adapter card; Determine the target serial number corresponding to the target adapter card in the adapter card whitelist; Determine the target storage medium channel corresponding to the target serial number in the adapter card static information table; Obtaining the real serial number of the target adapter card by reading through the target storage medium channel; If the real serial number is consistent with the target serial number, the target static information corresponding to the target serial number in the adapter card static information table is written into the preset storage medium for reading by the basic input and output system, thereby enabling the basic input and output system to identify the target adapter card.
2. The adapter card identification method according to claim 1, characterized in that: Obtaining the real serial number of the target adapter card through the target storage medium channel includes: Reading the field replaceable unit information of the target adapter card from the storage medium of the target adapter card through the target storage medium channel; The field replaceable unit information is parsed to obtain the real serial number of the target adapter card.
3. The adapter card identification method according to claim 1, characterized in that: If the real serial number is consistent with the target serial number, the target static information corresponding to the target serial number in the adapter card static information table is written into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system to identify the target adapter card, including: If the real serial number is consistent with the target serial number, obtaining the adapter card type corresponding to the target serial number in the adapter card static information table; Determine the target storage partition of the adapter card type in the preset storage medium according to a preset mapping relationship; wherein the preset mapping relationship is a mapping relationship between the adapter card type and the adapter card static information storage partition; Writing the target static information corresponding to the target serial number in the adapter card static information table into the target storage partition in the preset storage medium, so that the basic input and output system can read the target static information in the target storage partition, thereby realizing the basic input and output system's identification of the target adapter card; Accordingly, the method further comprises: If the real serial number is inconsistent with the target serial number, the process returns to the step of traversing the adapter card physical link information table to determine the next target adapter card.
4. The adapter card identification method according to claim 1, characterized in that: Writing the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system identifying the target adapter card, comprising: The target static information corresponding to the target serial number in the adapter card static information table is written into the preset storage medium, so that the basic input and output system calls the interface command of the baseboard management controller to read the preset storage medium, thereby realizing the basic input and output system's identification of the target adapter card.
5. The adapter card identification method according to claim 1, characterized in that: Writing the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system identifying the target adapter card, comprising: The target static information corresponding to the target serial number in the adapter card static information table is written into the preset storage medium for reading by the basic input and output system, so as to realize the basic input and output system to identify the target adapter card, and allocate bandwidth to the target adapter card according to the target static information of the target adapter card.
6. The adapter card identification method according to claim 1, characterized in that: Also includes: Traversing the adapter card physical link information table to obtain the physical link information of each adapter card in the server; Physical link switching is performed according to the physical link information of the adapter card to access the connection device of the adapter card.
7. The adapter card identification method according to any one of claims 1 to 6, characterized in that: Also includes: When receiving a motherboard replacement prompt, determining a new storage medium on the target motherboard according to the motherboard replacement prompt; Return to the step of traversing the adapter card physical link information table to determine the target adapter card, so as to write the static information of each adapter card in the server into the new preset storage medium.
8. An adapter card identification device, characterized in that: Applied to a baseboard management controller, the baseboard management controller is deployed on a server, the server also includes a basic input and output system and a preset storage medium, the baseboard management controller and the basic input and output system are both communicatively connected with the preset storage medium, the device includes: A traversal module, used to traverse the physical link information table of the adapter card to determine the target adapter card; A first determination module, configured to determine a target serial number corresponding to the target adapter card in the adapter card whitelist; A second determination module is used to determine the target storage medium channel corresponding to the target serial number in the adapter card static information table; A reading module, used for reading the real serial number of the target adapter card through the target storage medium channel; The identification module is used to write the target static information corresponding to the target serial number in the adapter card static information table into the preset storage medium if the real serial number is consistent with the target serial number, so as to be read by the basic input and output system, thereby realizing the basic input and output system's identification of the target adapter card.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the adapter card identification method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the adapter card identification method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method, device and equipment for determining physical position of external insertion equipment and storage medium
CN115509978A
Configuration processing method and device of target equipment, equipment and storage medium
CN117369903A
Method for reading information of riser cards of different specifications and baseboard management control module
CN117708004A
Configuration information acquisition method and device, baseboard management controller, system and medium
CN118585259A
Cited By
Data processing method and device, electronic equipment, storage medium and program product
CN120743611A