Equipment information acquisition method and electronic equipment

By acquiring the identity information of target devices on the device topology during server startup and dynamically locating key target devices based on count values, this method replaces manual hard coding, adapts to more devices, reduces development costs, and improves the server's compatibility and stability with diverse devices.

CN121037232AActive Publication Date: 2025-11-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511557405.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2025-11-28
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

Existing technologies suffer from poor flexibility in acquiring equipment information and high development costs.

Method used

By obtaining the identity information of target devices on the device topology during server startup and dynamically locating key target devices based on count values, this method replaces manual hard coding, adapts to more devices, and reduces development costs.

Benefits of technology

As shown in Figure 2, the problem of poor flexibility in obtaining equipment information has been solved, and a technical effect of high flexibility in obtaining equipment information has been achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121037232A_ABST
    Figure CN121037232A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment information acquisition method and electronic equipment, and relates to the technical field of equipment management, and equipment asset information of each piece of equipment in a server is important information for realizing full-life-cycle management of the equipment and guaranteeing stable operation of the server. However, the position of the key device representing the core identity information of the device in the device topology is uncertain, and the flexibility of acquiring the device information by a hard coding mode in the related technology is poor, so that the key target device is dynamically and accurately positioned based on the count value by defining the count value in the identity information of the target device on the device topology. According to the method, independent hard coding adaptation for each type of equipment is not needed, only the identity information of the equipment needs to be pre-configured, more equipment can be flexibly adapted, the compatibility of a server to diversified equipment is improved, meanwhile, when firmware is updated, the equipment can still be positioned by matching the identity information, and it is ensured that when the equipment enumeration sequence is changed, the equipment enumeration efficiency is improved. Equipment asset information is accurately obtained, and free equipment updating is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of device management, and particularly relates to a device information acquisition method and an electronic device. BACKGROUND

[0002] The internal of the intelligent device usually contains multiple virtual devices, forming a multi-Function (functional unit) subsystem architecture, and the device asset information of each device in the server is important information for realizing the whole life cycle management of the device and guaranteeing the stable operation of the server. However, due to the device architecture, firmware version and system environment factors of different manufacturers and other aspects, the position of the key device representing the core identity information of the device in the device topology is uncertain.

[0003] In the related art, the device topology information is mainly determined by manual analysis, the position index of the key device is determined, and then the hard-coded processing logic is added for the specific device in the BIOS (Base Input / Output System, basic input / output system) code, so as to acquire the device information. However, this method cannot adapt to the device firmware update, has poor flexibility, and has high development cost. SUMMARY

[0004] The present application provides a device information acquisition method and an electronic device, to at least solve the problems of poor flexibility in acquiring device information and high development cost in the related art.

[0005] The present application provides a device information acquisition method applied to a starting system, including the following steps: in a server starting process, acquiring first identity information of a target device on a device topology, storing the first identity information of the target device to a pre-set first configuration list, the device topology including multiple devices, and the device information level of the target device being greater than that of other devices on the device topology; acquiring second identity information of a device node on a device link of the server, querying the first configuration list based on the second identity information of the device node, to determine whether the first identity information is consistent with the second identity information on the first configuration list; if the second identity information is consistent with the first identity information, identifying a count value in the first identity information, acquiring a device topology of the device node, and querying the target device on the device topology based on the count value, to acquire device information of the target device; if the second identity information is not consistent with the first identity information, acquiring a device topology of the device node, taking a first device of the device topology as the target device on the device topology, and acquiring device information of the target device.

[0006] The application further provides a device information acquisition method applied to a substrate management controller, including the following steps: acquiring a first command sent by a starting system, setting first identity information of a target device on a device topology in a first setting page in response to an adding instruction of the device topology, generating the first command according to the first identity information after setting is completed; identifying the first identity information in the first command, obtaining information identification and first device identification data by analyzing the first identity information, establishing a data structure body if the information identification is a target identification set in advance; storing the device identification data by using the data structure body, reading fourth identity information of the target device on the device topology from a second memory, and storing the fourth identity information to a fourth configuration list set in advance; querying the fourth configuration list based on the data structure body, updating the fourth identity information by using the first identity information if the query is successful, adding the first identity information in the fourth configuration list if the query fails; storing the fourth configuration list to the second memory, generating a saving completion identification, generating feedback information according to the saving completion identification, sending the feedback information to the starting system, and executing any one of the device information acquisition methods in a starting server process of the starting system.

[0007] The application further provides a device information acquisition method applied to a substrate management controller, including the following steps: acquiring a first command sent by a starting system, setting first identity information of a target device on a device topology in a first setting page in response to an adding instruction of the device topology, generating the first command according to the first identity information after setting is completed; identifying the first identity information in the first command, obtaining information identification and first device identification data by analyzing the first identity information, establishing a data structure body if the information identification is a target identification set in advance; storing the device identification data by using the data structure body, reading fourth identity information of the target device on the device topology from a second memory, and storing the fourth identity information to a fourth configuration list set in advance; querying the fourth configuration list based on the data structure body, updating the fourth identity information by using the first identity information if the query is successful, adding the first identity information in the fourth configuration list if the query fails; storing the fourth configuration list to the second memory, generating a saving completion identification, generating feedback information according to the saving completion identification, sending the feedback information to the starting system, and executing any one of the device information acquisition methods in a starting server process of the starting system.

[0008] The application further provides an electronic device including a memory for storing a computer program, and a processor for executing the computer program to realize the steps of any one of the device information acquisition methods.

[0009] Since the device asset information of each device in the server is important information for realizing device full life cycle management and ensuring stable operation of the server, the device asset information of each device in the server needs to be obtained. However, due to device architecture, firmware version, system environment factors and other factors of different manufacturers, the location of the key device representing the core identity information of the device in the device topology is uncertain. The hard coding method in the related art cannot adapt to firmware update, and the key device of each device needs to be re-written based on the code, which has poor flexibility. Therefore, the embodiment of the present application can dynamically and accurately locate the key target device based on the count value in the identity information of the target device in the device topology, replace the manual hard coding method to obtain the key target device information, and does not need to be hard coded and adapted for each device. Only the identity information of the device needs to be pre-configured, which can adapt to more devices, reduce labor and development cost, improve the compatibility of the server to diversified devices, and ensure that the device asset information can be accurately obtained when the enumeration order of the device changes, thereby ensuring the freedom of device update and the long-term stable operation of the server system. Therefore, the technical problems of poor flexibility and high development cost of device information acquisition in the related art can be solved, and the technical effects of flexible device information acquisition and low development cost can be achieved. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0011] Figure 1 The flowchart of the device information acquisition method provided by an embodiment of the present application is shown in the figure. Figure 2 The flowchart of the device information acquisition method provided by an embodiment of the present application is shown in the figure. Figure 3 The flowchart of the device information acquisition method provided by another embodiment of the present application is shown in the figure. Figure 4 The flowchart of the device information acquisition method provided by another embodiment of the present application is shown in the figure. Figure 5 The hardware interaction diagram for obtaining device information provided by an embodiment of the present application is shown in the figure. Figure 6 The flowchart of the device information acquisition method provided by an embodiment of the present application is shown in the figure. Figure 7 The schematic diagram of the device information acquisition apparatus provided by an embodiment of the present application is shown in the figure. Figure 8 A schematic diagram of a device information acquisition apparatus provided for another embodiment of the present application; Figure 9 A schematic diagram of a device information acquisition apparatus provided for another embodiment of the present application. DETAILED DESCRIPTION

[0012] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0013] It should be noted that, in the description of the present application, the terms “comprise”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0014] Before describing the solutions of the present application, the related technologies of the present application are introduced.

[0015] In the server system architecture, the wide application of intelligent devices (such as intelligent network cards, intelligent storage controllers, GPUs, etc.) significantly improves the system performance, but also brings the multi-Function challenge of device management. These intelligent devices usually contain multiple virtual devices inside, forming a multi-Function subsystem architecture.

[0016] However, the location of the key device representing the core identity information of the intelligent device in the internal topology is uncertain. This device carrying important asset information (including manufacturer ID, device model, serial number, firmware version, etc.) can be the first, second or later device in the internal device tree. This uncertainty is mainly due to the differences in device architecture of different manufacturers, firmware version updates, and system environment factors, etc.

[0017] The method for obtaining device information in the related art is mainly to manually analyze the device topology information output by the lspci command, determine the location index of the key device, and then add hard-coded processing logic for the specific device in the BIOS code. Although this method can temporarily solve the problem, it has the following problems: Firstly, this method lacks flexibility, and each new device supported requires modification of the BIOS code, resulting in a bloated code base that is difficult to maintain, and the development team needs to maintain separate support code for each device model, greatly increasing the development burden.

[0018] Secondly, the maintenance cost of the scheme is high, from device testing, analysis to code modification and verification, the whole process needs to consume a lot of human resources and time cost, prolongs the time to market of new products.

[0019] In addition, the method of the related art cannot adapt to device firmware updates. When the smart device manufacturer releases new firmware that may change the internal device enumeration order, the original hard-coded position information is immediately invalid, resulting in incorrect asset information acquisition. Users face a dilemma: either give up device firmware updates and cannot obtain new functions and security patches; or bear the risk of incorrect asset information.

[0020] With the increasing variety of smart devices, this hard-coded-based scheme is unsustainable, and the special processing logic in the code severely limits the compatibility of the server platform for diversified smart devices. At the same time, from the development trend of technology, the application range of smart devices is continuously expanding, and new devices are constantly emerging, and the internal architecture of the device is also increasingly multi-function. The method in the related art cannot meet the development needs.

[0021] Therefore, the present application proposes an information acquisition method to solve at least one of the above technical problems.

[0022] In order for those skilled in the art to better understand the present application scheme, the present application will be further described in detail below in conjunction with the drawings and specific embodiments.

[0023] Figure 1 A flowchart of a device information acquisition method according to an embodiment of the present application.

[0024] As Figure 1 shown, the device information acquisition method is applied to a startup system, which includes steps S101-S104, wherein the startup system can be a server BIOS system.

[0025] In step S101, during the server startup process, the first identity information of the target device on the device topology is acquired, and the identity information of the target device is stored in the first configuration list set in advance. The device topology includes a plurality of devices, and the device information level of the target device is higher than that of other devices on the device topology.

[0026] The first identity information can be obtained from the first memory, and the first memory is used to provide storage space for starting the system and can be an NVRAM (Non-Volatile Random Access Memory). The identity information includes a DID (device ID), a VID (manufacturer ID), an SSID (subsystem device ID), an SVID (subsystem manufacturer ID), and a Count (count value). The first identity information can also be referred to as core identity information. The target device can be a core device or a key device in a multi-Function device. The target device carries the core identity information (i.e., asset information) of the device. The multi-Function device is connected to a server mainboard based on a PCIE (Peripheral Component Interconnect Express) bus. The core feature of the multi-Function device is that a single physical device internally encapsulates multiple function units or virtual devices. These function units or virtual devices work together to form a subsystem, which can exert the comprehensive performance of hardware and also needs to manage the identity and function information (such as manufacturer ID, serial number, and firmware version) of each virtual device through a specific way. For example, the multi-Function device can be a smart network card, a smart memory, a GPU, etc. The device information includes a manufacturer ID, a device model, a serial number, a firmware version, a category code, a subcategory code, and the like.

[0027] It can be understood that in the server starting process, the first identity information of the target device on the device topology can be obtained from the first memory, and the first identity information of the target device is stored in the first configuration list set in advance, so as to facilitate the matching of the identity information of the device in the subsequent process. The device information level of the target device is higher than that of other devices on the device topology.

[0028] For example, the smart network card A includes a network port 1, a network port 2, and a network port 3. Each network port corresponds to a Function. The network port 1 carries the core identity information of the smart network card A. The network port 1 is the target device. The network port 2 and the network port 3 are other devices on the device topology of the smart network card A. The device information level of the network port 2 is higher than that of the network port 2 and the network port 3.

[0029] In some embodiments of the present application, before obtaining the first identity information of the target device on the device topology, the method comprises: in response to an adding instruction of the device topology, setting the first identity information of the target device on the device topology in a first setting page, after the setting is completed, judging whether the first identity information is valid; if the first identity information is valid, updating the first identity information to a first storage, generating a first command according to the first identity information, sending the first command to a baseboard management controller, and the baseboard management controller saves the first identity information to a second storage in response to the first command; obtaining feedback information of the baseboard management controller, and if a save completion identifier is identified in the feedback information, generating at least one of an adding success prompt and a server restart prompt.

[0030] The first setting page is a first setting page for setting the first identity information of the target device on the device topology in the starting system, which can be referred to as an adding setting page. The first command can be an IPMI command, which is issued by the starting system and is used to store the information of the multiple Function devices and the core identity information of the first built-in device, and set the interface specification and the standard of the stored information. The second storage is used to provide a storage space for the baseboard management controller, and can be an EEPROM (Electrically Erasable Programmable Read-Only Memory).

[0031] It can be understood that the embodiments of the present application can set the first identity information of the target device on the device topology in the first setting page in response to an adding instruction of the device topology, after the setting is completed, judge whether the first identity information is valid; if the first identity information is valid, update the first identity information to a first storage, generate a first command according to the first identity information, send the first command to a baseboard management controller, and the baseboard management controller saves the first identity information to a second storage in response to the first command, obtain feedback information of the baseboard management controller, and if a save completion identifier is identified in the feedback information, generate at least one of an adding success prompt and a server restart prompt. Through the command, the adding of the target device on the device topology can be realized, and there is no need to add the position index of the target device in the starting system by hard coding, which reduces the code development cost.

[0032] Specifically, the user can enter the BIOS setting path, slot configuration -> integrated input / output configuration, add a composite device information support module, and the module contains an adding option - adding device.

[0033] Click to add device, pop-up add settings page, set DID, VID, SSID, SVID, COUNT information, used to set the core identity information of multi-function device (i.e. the first identity information), click the confirm button after setting, judge the validity of the data. If valid, the information is de-duplicated and the latest information is updated to the first memory NVRAM of BIOS, and needs to be sent to BMC for saving through the IPMI command of information storage process, and BMC saves the information to the second memory EEPROM. After saving, it prompts "add device successfully, need to restart the server to take effect", and provides "immediate restart" and "restart later" buttons.

[0034] In some embodiments of the present application, before obtaining the first identity information of the target device on the device topology, the third command sent by the baseboard management controller is obtained, the baseboard management controller responds to the addition instruction of the device topology, sets the first identity information of the target device on the device topology in the third setting page, and generates the third command according to the first identity information after setting; identify the first identity information in the third command, parse the first identity information to get the information identifier and the first device identifier data, if the information identifier is the target identifier set in advance, establish the data structure body; store the device identifier data by using the data structure body, read and obtain the third identity information of the target device on the device topology, and store the third identity information to the second configuration list set in advance; query the second configuration list based on the data structure body, if the query is successful, update the third identity information by using the first identity information, if the query fails, add the first identity information in the second configuration list; store the second configuration list to the first memory, generate a save completion identifier, generate feedback information according to the save completion identifier, and send the feedback information to the baseboard management controller.

[0035] The third command is also an IPMI command, which is sent by the baseboard management controller, and is used to store the information of the multi-function device and the core identity information of the first built-in device, and set the interface specification and the standard of storing information; the third setting page is the interface of the baseboard management controller for adding device identity information; the target identifier is a pre-set identifier, which is used to ensure the legitimacy of the information, filter valid commands, exclude invalid / illegal data, and can be used to determine the type of the command, so as to manage the device information; the device identifier data can include DID, VID, SSID, SVID, etc.; the second configuration list stores the third identity information of the target device read from the first memory.

[0036] It is understood that in the embodiments of this application, device identity information can be added at the baseboard management controller. When a third command to add device information is received from the baseboard management controller, the first identity information in the third command is identified, the first identity information is parsed to obtain information identifier and first device identifier data, and when it is determined that the information identifier is the target identifier of the pre-set device, it indicates that it is a legal instruction. Then, a data structure is established, the device identifier data is stored in the data structure, the third identity information of the target device on the device topology is read from the first memory, and the third identity information is stored in the pre-set second configuration list. The second configuration list is queried using the data structure.

[0037] If the query is successful, it indicates that the device's identity information has been set before. The latest first identity information is then used to update the previously stored third identity information to ensure that the information is up-to-date. If the query fails, it indicates that the device's identity information has not been set before. The first identity information is added to the second configuration list, the second configuration list is stored in the first memory, a save completion flag is generated, feedback information is generated based on the save completion flag, and the feedback information is sent to the baseboard management controller.

[0038] When adding a new device to a server system, this application embodiment does not require modifying the BIOS code as in related technologies. The development team does not need to maintain separate support code for each device model. At the same time, it does not require the large amount of human resources and time costs of the information acquisition process from device testing and analysis to code modification and verification in related technologies. It can flexibly adapt to multiple devices by simply adding the device identity information, thereby reducing development costs and human and time costs.

[0039] The data structure in this application embodiment can be used to store device identification data or device count values. In other words, the data structure in this application embodiment is used to store device identity information, and the form of the data structure can be as follows: typedef struct{ UINT16Did; UINT16Vid; UINT16Ssid; UINT16Svid; UINT16Count } DEVICE_MESSAGE, where Did, Vid, Ssid, and Svid are device identification data, and Count is the count value.

[0040] In some embodiments of the present application, the second configuration list is queried based on the data structure, including: obtaining second device identification data by parsing the third identity information; if the first device identification data and the second device identification data are consistent, it is determined that the query is successful; if the first device identification data and the second device identification data are inconsistent, it is determined that the query fails.

[0041] It can be understood that the embodiments of the present application can obtain second device identification data by parsing the third identity information, and determine whether the identity information of the device is previously stored in the second configuration list by comparing the second device identification data with the first device identification data in the first identity information, so as to avoid repeated operations on the same device, guarantee the uniqueness of the information, and further improve the accuracy of subsequent device information acquisition.

[0042] For example, the device identification data DID, VID, SSID, and SVID obtained by parsing the third identity information are x1, x2, x3, and x4, respectively, and the first device identification data is x1, x2, x3, and x4, and it is determined that the query is successful.

[0043] In some embodiments of the present application, after generating at least one of the new success prompt and the server restart prompt, it further includes: in response to a deletion instruction of the device topology, setting the first identity information of the target device on the device topology on the second setting page, and after the setting is completed, determining whether the first identity information is valid; if the first identity information is valid, deleting the first identity information from the first memory, generating a second command according to the first identity information, sending the second command to the baseboard management controller, and the baseboard management controller responds to the second command to delete the first identity information from the second memory; obtaining feedback information of the baseboard management controller, and if a deletion completion identifier is identified in the feedback information, generating at least one of a deletion success prompt and a server restart prompt.

[0044] The first setting page is used for setting the first identity information of the target device on the device topology in the starting system, which can be called a deletion setting page; the second command can be an IPMI command, which is issued by the starting system and is used to delete the information of the multiple Function devices and the core identity information of the first built-in device.

[0045] It can be understood that the embodiments of the present application can respond to the deletion instruction of the device topology, set the first identity information of the target device on the device topology in the first setting page, judge whether the first identity information is valid after setting is completed, if the first identity information is valid, update the first identity information to the first memory, generate a second command according to the first identity information, send the first command to the baseboard management controller, the baseboard management controller responds to the second command, saves the first identity information to the second memory, obtains the feedback information of the baseboard management controller, if the feedback information identifies the save completion identifier, generates at least one of the new success prompt and the server restart prompt, and the device information of the target device on the device topology can be deleted through the command, when the firmware is updated, only the device information of the device needs to be deleted, and it can be newly added, which avoids the risk of device asset information acquisition error that may be caused by user selection of update, at the same time, the system and the baseboard manager are started to interact information in the process of adding device information, so as to ensure that the information is consistent and improve the accuracy of subsequent device information acquisition.

[0046] Specifically, the user can enter the BIOS setting path, slot configuration -> integrated input / output configuration, add composite device information support module, and the module contains a delete option-delete device.

[0047] Clicking the delete device pops up the delete setting page, the setting information includes DID, VID, SSID, SVID information, after clicking the "confirm" button, the validity of the data is judged. If it is valid, update the NVRAM of BIOS in the same way as the IPMI command processing logic, and need to send to BMC through the IPMI command of information deletion process, after processing, prompt "delete device success, need to restart the server to take effect", and provide "immediate restart" and "restart later" button to meet the needs of users in different situations.

[0048] In some embodiments of the present application, before obtaining the first identity information of the target device on the device topology, the fourth command sent by the baseboard management controller is obtained, the baseboard management controller responds to the deletion instruction of the device topology, sets the first identity information of the target device on the device topology in the fourth setting page, and generates the fourth command according to the first identity information after the setting is completed; the first identity information in the third command is identified, the information identifier and the first device identifier data are obtained by analyzing the first identity information, if the information identifier is a pre-set target identifier, a data structure body is established; the device identifier data is stored by using the data structure body, the third identity information of the target device on the device topology is read from the first memory, and the third identity information is stored in the pre-set third configuration list; the third configuration list is queried based on the data structure body, if the query is successful, the corresponding third identity information is deleted from the first memory, the third configuration list is stored to the first memory, a deletion completion identifier is generated, feedback information is generated according to the deletion completion identifier, and the feedback information is sent to the baseboard management controller.

[0049] The fourth command is also an IPMI command, which is sent by the baseboard management controller and is used to delete the information of the multi-function device and the core identity information of the first built-in device; the fourth setting page is an interface for deleting the device identity information on the baseboard management controller side; the third configuration list stores the third identity information of the target device read from the first memory.

[0050] It can be understood that the embodiments of the present application can delete the device identity information on the baseboard management controller side, when the fourth command for deleting the device information sent by the baseboard management controller is received, the first identity information in the fourth command is identified, the information identifier and the first device identifier data are obtained by analyzing the first identity information, and when it is determined that the information identifier is a pre-set target identifier, it is indicated that it is a legal instruction, then a data structure body is established, the device identifier data is stored by using the data structure body, the third identity information of the target device on the device topology is read from the first memory, and the third identity information is stored in the pre-set second configuration list, and the second configuration list is queried by using the data structure body.

[0051] If the query is successful, it is indicated that the identity information of the device has been set before, the device information corresponding to the device is deleted, the first identity information is added to the third configuration list, the third configuration list is stored to the first memory, a deletion completion identifier is generated, feedback information is generated according to the deletion completion identifier, and the feedback information is sent to the baseboard management controller.

[0052] To sum up, the embodiment of the application can flexibly adapt to various devices by the above-mentioned adding and deleting device identity information without modifying the BIOS code, without the development team maintaining separate support code for each device model, without the process of consuming a large amount of human resources and time cost from device testing, analysis to code modification and verification in the related art, reducing the development cost and human time cost, and shortening the time to market of new products.

[0053] In addition, it also needs to be explained that the embodiment of the application can not only add and delete device identity information, but also the starting system and the baseboard manager can also perform the query operation on the identity information.

[0054] In step S102, the second identity information of the device node on the device link of the server is obtained, and the first configuration list is queried based on the second identity information of the device node to determine whether the second identity information is consistent with the first identity information on the first configuration list.

[0055] The first configuration list is used to store the first identity information of the target device, and the second identity information includes DID, VID, SSID, and SVID information of the device node.

[0056] It can be understood that the embodiment of the application can obtain the second identity information of the device node on the device link of the server, query the first configuration list based on the second identity information of the device node, and determine whether the second identity information is consistent with the first identity information on the first configuration list, so as to obtain the device information of the target device subsequently.

[0057] Specifically, the embodiment of the application can obtain the multi-Function device core identity information stored in the NVRAM through the getVariable function, and store the read information into the first configuration list. The Pcieinfo module executes the node on all PCIE links in turn, obtains the DID, VID, SSID, and SVID information (second identity information) of the node in turn, and compares the DID, VID, SSID, and SVID of the node with the first identity information in the first configuration list in turn.

[0058] In step S103, if the second identity information is consistent with the first identity information, the count value in the first identity information is identified, the device topology of the device node is obtained, the target device on the device topology is queried from the device topology based on the count value, and the device information of the target device is obtained.

[0059] The count value can be a Count value.

[0060] It can be understood that, when the second identity information is consistent with the first identity information on the first configuration list, the counting value in the first identity information is recognized, and the target device on the device topology of the device node is queried based on the counting value, the device information of the target device is acquired, and the device information of the target device is taken as the core identity information of the device.

[0061] In step S104, if the second identity information is inconsistent with the first identity information, the device topology of the device node is acquired, the first device of the device topology is taken as the target device on the device topology, and the device information of the target device is acquired.

[0062] It can be understood that, when the second identity information is inconsistent with the first identity information on the first configuration list, the first device in the device topology of the device node is taken as the target device on the device topology, and the device information of the first device is taken as the core identity information of the device, so as to ensure that the device information can be recognized when the target device of the device node is not configured by the user, avoid the risk of loss of device asset information, ensure the compatibility of the device, and guarantee the stable operation of the server system.

[0063] Since the device asset information of each device in the server is important information for realizing the whole life cycle management of the device and guaranteeing the stable operation of the server, it is necessary to acquire the device asset information of each device in the server. However, due to the device architecture, firmware version, system environment factors and other factors of different manufacturers, the position of the key device representing the core identity information of the device in the device topology is uncertain. The hard coding method in the related technology cannot adapt to firmware updates, and the key device of each device is re-written based on the code, which has poor flexibility. Therefore, the embodiment of the application can dynamically and accurately locate the key target device based on the counting value in the identity information of the target device on the device topology, replace the manual hard coding method to acquire the key target device information, and does not need to hard code and adapt to each device separately. Only the identity information of the device needs to be pre-configured, which can flexibly adapt to more devices, reduce the labor and development cost, improve the compatibility of the server to diversified devices, and ensure that the device asset information can be accurately acquired when the enumeration order of the device changes, guarantee the freedom of device update, and further guarantee the long-term stable operation of the server system.

[0064] In some embodiments of the application, after acquiring the device information of the target device, the device information is stored in the first storage, and the storage information of the first storage is transmitted to the baseboard management controller. The baseboard management controller recognizes the device information in the storage information and displays the device information.

[0065] The starting system can deliver the device information to the baseboard management controller through H2B (Host to BMC).

[0066] It can be understood that, after obtaining the device information of the target device, the device information is stored in the first memory, and the storage information of the first memory is delivered to the baseboard management controller. The baseboard management controller identifies the device information in the storage information and displays the device information, so as to complete the delivery of the device information, and the device information can also be used for other functions.

[0067] Specifically, the execution flow of information acquisition of the embodiment of the application is as shown in Figure 2 The execution flow of information acquisition of the embodiment of the application is as shown in Step 1: The server is started.

[0068] Step 2: A structure body is added, which is used to store the set multiple Function device core identity information, typedef struct{UINT16Did; UINT16Vid; UINT16Ssid; UINT16Svid; UINT16Count } DEVICE_MESSAGE; and a variable DEVICE_MESSAGE *DevList is defined.

[0069] Step 3: The multiple Function device core identity information (first identity information) stored in the NVRAM (first memory) is obtained through the getVariable function, and the read information is stored in the DevList (first configuration list).

[0070] Step 4: The Pcieinfo module is executed to poll all nodes on the PCIE link in sequence, and the DID, VID, SSID and SVID information of the nodes are obtained in sequence. If the obtaining is successful, the next step is entered, otherwise, step 8 is jumped. Step 5: The DID, VID, SSID and SVID of the node are compared with the information in the DevList in sequence. If the corresponding device information is found, step 6 is entered; otherwise, if it is an EP device, step 8 is jumped, and other cases jump to step 4 to continue searching.

[0071] It should be noted that EP is an endpoint device, that is, if the device is obtained, it needs to be specially processed if it is in the DevList, and if it is not in the list, it is considered to be specific device information that needs to be displayed, which can represent a specific in-place device.

[0072] Step 6: Obtain the corresponding Count value (count value) in DevList, and sequentially find the Countth device information of the same BUS (node) number.

[0073] Step 7: If the device is found, obtain all useful information of the device, including DID, VID, SSID, SVID, ClassCode, SubClassCode, MaxLinkWidth, MaxLinkSpeed and all other information, and store the information according to the interaction specification. The information is the final information displayed to the outside of the device, the next BUS number is obtained and the step 4 is jumped to continue searching; if not found, continue to the next step.

[0074] Step 8: Obtain the device information of the first Function of the device as the core identity information of the device, and obtain all useful information of the Function device, including DID, VID, SSID, SVID, ClassCode, SubClassCode, MaxLinkWidth, MaxLinkSpeed and all other information, and store the information according to the interaction specification. The information is the final information displayed to the outside of the device, and the step 4 is jumped to continue searching.

[0075] Step 9: After polling, the finally summarized storage information is transmitted to BMC through H2B to display PCIE device and other functions, so as to complete the transmission of PCIE device information.

[0076] Step 10: End.

[0077] According to the device information acquisition method provided in the embodiments of the present application, the count value in the identity information of the target device on the device topology can be defined, and the key target device can be dynamically and accurately positioned based on the count value. The key target device information is acquired by replacing the manual hard coding mode, without the need for separate hard coding adaptation for each device. Only the identity information of the device needs to be pre-configured, which can flexibly adapt to more devices, reduce labor and development costs, improve the compatibility of the server to diversified devices, and ensure that the device asset information can be accurately acquired even when the device enumeration order changes, thereby ensuring the long-term stable operation of the server system.

[0078] The above embodiments focus on describing the device information acquisition method of the embodiments of the present application from the starting system side, and the following embodiments focus on describing the device information acquisition method of the embodiments of the present application from the baseboard management controller side. The parts not described in detail in the embodiments can be referred to each other.

[0079] Figure 3 A flowchart of a device information acquisition method according to another embodiment of the present application.

[0080] As shown in Figure 3 The device information acquisition method is applied to a baseboard management controller and includes the following steps. In step S201, a first command sent by a startup system is acquired. The startup system sets first identity information of a target device on a device topology in a first setting page in response to an adding instruction of the device topology. After the setting is completed, a first command is generated according to the first identity information.

[0081] The first setting page is a first setting page for setting the first identity information of the target device on the device topology at the startup system side, which can be referred to as an adding setting page. The first command can be an IPMI command, which is sent by the startup system and is used to store information of a plurality of Function devices and core identity information of a first built-in device, and set an interface specification and a storage information standard.

[0082] It can be understood that the first command sent by the startup system can be acquired according to the embodiments of the present application. The startup system sets the first identity information of the target device on the device topology in the first setting page in response to the adding instruction of the device topology. After the setting is completed, the first command is generated according to the first identity information.

[0083] In some embodiments of the present application, before the first command sent by the startup system is acquired, the following steps are further included. The first identity information of the target device on the device topology is set in a third setting page in response to the adding instruction of the device topology. After the setting is completed, it is determined whether the first identity information is valid. If the first identity information is valid, the first identity information is updated to a second storage, a third command is generated according to the first identity information, the third command is sent to the startup system, the startup system responds to the third command and saves the first identity information to a first storage, and feedback information of the startup is acquired. If a saving completion identifier is identified in the feedback information, at least one of an adding success prompt and a server restart prompt is generated.

[0084] The third setting page is a third setting page for setting the first identity information of the target device on the device topology at the baseboard management controller side, which can be referred to as an adding setting page. The third command is also an IPMI command, which is sent by the baseboard management controller and is used to store information of a plurality of Function devices and core identity information of a first built-in device, and set an interface specification and a storage information standard.

[0085] It can be understood that the embodiments of the present application can respond to the adding instruction of the device topology, set the first identity information of the target device on the device topology in the third setting page, after the setting is completed, judge whether the first identity information is valid, if the first identity information is valid, update the first identity information to the second memory, generate a third command according to the first identity information, send the third command to the starting system, the starting system responds to the third command, saves the first identity information to the first memory, obtains the feedback information of the starting system, if the feedback information identifies the save completion identifier, at least one of the adding success prompt and the server restart prompt is generated.

[0086] Specifically, the user of the embodiments of the present application can realize the adding of device information at the baseboard manager end, and the process includes: 1. Click the add button, and pop up the input box, including DID, VID, SSID, SVID, COUNT prompt information and information setting box; 2. After the information is filled in, click the "confirm" button, then enter the next step; click the "cancel" button, then exit the adding setting box; 3. Check all input information, all information must be numerical type, if the information is filled in error, prompt the corresponding error details; otherwise, enter the next step; 4. The baseboard management controller stores the core identity information of the multi-function device to the EEPROM (second memory) specified position according to the protocol requirements, and generates the IPMI command (third command) according to the IPMI requirements of the added multi-function device information and sends it to the starting system; 5. After the starting system receives the command, it suspends the current task and immediately enters the interrupt processing program; 6. The interrupt processing program is called, the IPMI command is parsed according to the interaction specification, and the multi-function device core identity information stored in the NVRAM (second memory) is updated; 7. After the modification is completed, the starting system returns the response of 00 to the baseboard management controller, and clears the interrupt flag; 8. The front end displays the prompt box: "adding device successfully, need to restart the server to take effect", and provides "immediate restart" and "restart later" options.

[0087] In step S202, the first identity information in the first command is identified, the information identifier and the first device identifier data are obtained by parsing the first identity information, and if the information identifier is the target identifier set in advance, the data structure body is established.

[0088] The information identifier can be an information header; the target identifier is a pre-set identifier, used to ensure the legitimacy of the information, filter valid commands, exclude invalid / illegal data, and can be used to determine the type of command for managing device information; and the device identifier data can include DID, VID, SSID, SVID, etc.

[0089] It can be understood that the embodiment of the application can parse the first identity information to obtain the information identifier and the first device identifier data. If the information identifier is a pre-set target identifier, it indicates that it is a legal instruction, and then the data structure body is established.

[0090] In step S203, the first device identifier data is stored by using the data structure body, the fourth identity information of the target device on the device topology is read from the second memory, and the fourth identity information is stored in the pre-set fourth configuration list.

[0091] The fourth configuration list stores the fourth identity information of the target device read from the second memory.

[0092] It can be understood that the embodiment of the application can use the data structure body to read the fourth identity information of the target device on the device topology from the second memory by using the first device identifier data, and store the fourth identity information in the pre-set fourth configuration list, so as to query the device identity information subsequently.

[0093] In step S204, the fourth configuration list is queried based on the data structure body. If the query is successful, the fourth identity information is updated by using the first identity information. If the query fails, the first identity information is added to the fourth configuration list.

[0094] It can be understood that the embodiment of the application can query the fourth configuration list based on the data structure body. When the query is successful, it indicates that the identity information of the device has been stored in the second memory previously, and the previous fourth identity information is updated by using the latest first identity information, so that the identity information in the fourth configuration list is the latest information, facilitating subsequent acquisition of accurate device information. When the query fails, it indicates that the identity information of the device has not been stored in the second memory previously, and the identity information can be added to the fourth configuration list directly.

[0095] In step S205, the fourth configuration list is stored to the second memory, a save completion identifier is generated, feedback information is generated according to the save completion identifier, the feedback information is sent to the starting system, and the starting system starts the server process to execute the above-mentioned device information acquisition method.

[0096] It can be understood that the fourth configuration list can be stored in the second memory according to the embodiment of the application, a save completion identifier is generated, feedback information is generated according to the save completion identifier, the feedback information is sent to the starting system, and the device information acquisition method is executed in the server starting process of the starting system to accurately acquire the device information.

[0097] Figure 4 A flowchart of a device information acquisition method according to yet another embodiment of the application is provided.

[0098] As shown in Figure 4 The device information acquisition method is applied to a baseboard management controller and includes the following steps. In step S301, a second command sent by a starting system is acquired. The starting system responds to a deletion instruction of a device topology, sets first identity information of a target device on the device topology in a second setting page, and generates a second command according to the first identity information after the setting is completed.

[0099] The second setting page is a first identity information deletion setting page for deleting the target device on the device topology at the starting system end. The second command can be an IPMI command, which is sent by the starting system and used to delete information of a multi-function device and core identity information of a built-in device.

[0100] It can be understood that the second command sent by the starting system can be acquired according to the embodiment of the application. The starting system responds to a deletion instruction of a device topology, sets first identity information of a target device on the device topology in a second setting page, and generates a second command according to the first identity information after the setting is completed.

[0101] In some embodiments of the application, before the second command sent by the starting system is acquired, the following steps are further included: responding to a deletion instruction of a device topology, setting first identity information of a target device on the device topology in a fourth setting page, judging whether the first identity information is valid after the setting is completed, deleting the first identity information from a second memory if the first identity information is valid, generating a fourth command according to the first identity information, sending the fourth command to the starting system, the starting system responding to the fourth command and deleting the first identity information from a first memory, acquiring feedback information of the starting system, and generating at least one of a deletion success prompt and a server restart prompt if a deletion completion identifier is identified in the feedback information.

[0102] The fourth setting page is a first identity information deletion setting page for setting the target device on the device topology at the baseboard management controller end. The fourth command is also an IPMI command, which is sent by the baseboard management controller and used to delete information of a multi-function device and core identity information of a built-in device.

[0103] It can be understood that the embodiments of the present application can respond to the adding instruction of the device topology, set the first identity information of the target device on the device topology in the fourth setting page, after the setting is completed, judge whether the first identity information is valid, if the first identity information is valid, update the first identity information to the second memory, generate the fourth command according to the first identity information, send the fourth command to the starting system, the starting system deletes the first identity information from the first memory in response to the fourth command, obtains the feedback information of the starting system, if the feedback information identifies the save completion identifier, then generates at least one of the deletion success prompt and the server restart prompt.

[0104] Specifically, the user of the embodiments of the present application can realize the deletion of device information at the baseboard manager end, and the process includes: 1. Click the "delete" button, and a input box is popped up, including DID, VID, SSID, SVID prompt information and information setting box; 2. After the information is filled in, click the "confirm" button, then enter the next step; click the "cancel" button, then exit the adding setting box; 3. Check all input information, all information must be numerical type, if the information is filled in error, prompt the corresponding detailed information; otherwise, enter the next step; 4. The baseboard management controller finds and deletes the multi-function device core identity information in the EEPROM (second memory) according to the protocol requirements, if the information exists, enter the next step; otherwise, prompt "no related device information is found" and return; 5. Generate IPMI command according to the IPMI requirements of deleting multi-function device core identity information and send it to the starting system; 6. After the starting system receives the command, it suspends the current task and immediately enters the interrupt processing program; 7. The starting system parses the IPMI command according to the interaction specification, and deletes the multi-function device core identity information stored in the NVRAM (first memory); 8. After the modification is completed, the starting system returns the response of 00 to the baseboard management controller, and clears the interrupt flag; 9. The front end displays the prompt box: "delete device successfully, need to restart the server to take effect", and provides "immediately restart" and "restart later" buttons.

[0105] In step S302, the first identity information in the second command is identified, the information identifier and the first device identifier data are obtained by parsing the first identity information, if the information identifier is the target identifier set in advance, the data structure body is established.

[0106] The information identifier can be an information header; the target identifier is a pre-set identifier, used to ensure the legitimacy of the information, filter valid commands, exclude invalid / illegal data, and can be used to determine the type of command for managing device information; and the device identifier data can include DID, VID, SSID, SVID, etc.

[0107] It can be understood that the embodiments of the application can parse the first identity information to obtain the information identifier and the first device identifier data. If the information identifier is a pre-set target identifier, it indicates that it is a legal instruction, and then the data structure body is established.

[0108] In step S303, the first device identifier data is stored by using the data structure body, the fifth identity information of the target device on the device topology is read from the second memory, and the fifth identity information is stored in the pre-set fifth configuration list.

[0109] The fifth configuration list stores the fifth identity information of the target device read from the second memory.

[0110] It can be understood that the embodiments of the application can use the data structure body to read the first device identifier data from the second memory to obtain the fifth identity information of the target device on the device topology, and store the fifth identity information in the pre-set fifth configuration list, so as to facilitate subsequent query of device identity information.

[0111] In step S304, the fifth configuration list is queried based on the data structure body. If the query is successful, the corresponding fifth identity information is deleted from the second memory, the fifth configuration list is stored in the second memory, a deletion completion identifier is generated, feedback information is generated according to the deletion completion identifier, the feedback information is sent to the starting system, and the starting system starts the server process to execute the above-mentioned device information acquisition method.

[0112] It can be understood that the embodiments of the application can query the fifth configuration list based on the data structure body. When the query is successful, it indicates that the identity information of the device has been previously stored in the second memory. Then the corresponding fifth identity information is deleted, so as to facilitate subsequent acquisition of accurate device information. The fifth configuration list can be stored in the second memory, a deletion completion identifier is generated, feedback information is generated according to the deletion completion identifier, the feedback information is sent to the starting system, and the starting system starts the server process to execute the above-mentioned device information acquisition method, so as to accurately acquire device information.

[0113] Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.

[0114] Based on the above device information acquisition method, the execution process of the embodiment of the application mainly includes two parts: one is to configure device information, and the other is to acquire device information. The BMC (Baseboard Management Controller) and the BIOS end can both configure device information, and information interaction is required during and after the configuration process to ensure information synchronization and improve the accuracy of subsequent device information acquisition.

[0115] The hardware architecture of device information interaction and acquisition of the embodiment of the application is shown in Figure 5 , which includes a management and protocol layer, a BMC, a BIOS, a communication medium, an interface, and the like.

[0116] The management and protocol layer includes IPMI management software, an IPMI protocol layer, and a communication interface layer. The IPMI management software is used to initiate a management instruction (i.e., a configuration instruction). The IPMI protocol layer is a protocol carrier for information transmission and carries the interactive commands of the BMC and the BIOS and the management software. The communication interface layer is a conversion bridge for the protocol and hardware and converts the IPMI command and the Redfish protocol instruction into hardware interactive signals recognizable by the BMC and the BIOS. The BMC is used to register the IPMI command according to the protocol specification and is used for the IPMI command interaction of whether the setting is successful. The Redfish protocol interaction is used. When the user configures the multi-Function device information through the BIOS, the bidirectional transmission of the configuration instruction needs to be realized through the Redfish protocol. The BIOS is used to read the device information from the memory and dynamically position the multi-Function device.

[0117] I. In the configuration device information stage, the IPMI command support information interaction is added.

[0118] (I) BMC end.

[0119] 1. Information addition process.

[0120] Step 1: The BMC adds an OEM IPMI command, which is used to store the information of the multi-Function device and the identity information of the first built-in device representing the device core, and sets the interface specification and the standard of the stored information, including the information identification bit_DEVID_, the DID, VID, SSID, SVID, and COUNT (identity information) of the device.

[0121] Step 2: When the BMC receives the command, it parses and judges whether the information header (i.e., the information identification) is_DEVID_ (the pre-set target identification). If the information header is_DEVID_, step 3 is entered; otherwise, return 01, indicating that the setting information is invalid, and the execution ends.

[0122] Step 3: Add a structure (i.e. data structure) to store the parsed information typedef struct{UINT16 Did; UINT16Vid; UINT16Ssid; UINT16Svid; UINT16Count } DEVICE_MESSAGE; And set the variable DevMessage, which is used to store the identity information of the newly added multi-Function device core. Step 4: Parse the information of the IPMI command in order, with each field being two bytes, namely DID, VID, SSID, SVID, and COUNT, and store the information in DevMessage.

[0123] Step 5: Define the variable DEVICE_MESSAGE *EepromDevList, read the multi-Function device core identity information at the specified location in EEPROM (the second memory), return the number of stored N, and store it to EepromDevList (the fourth configuration list).

[0124] Step 6: Compare the information in DevMessage (which stores the first identity information) with the information in EepromDevList (the fourth configuration list). If it already exists, update EepromDevList according to DevMessage. If it does not exist, add the information of DevMessage at the end of EepromDevList.

[0125] Step 7: Rewrite all the information of EepromDevList at the specified location in EEPROM, and return the information 00, indicating that the information has been successfully stored in EEPROM.

[0126] Step 8: End.

[0127] 2. Information deletion process.

[0128] Step 1: Add an OEM IPMI command to delete the identity information of the multi-Function device core, including the flag bit _DEVID_, the DID, VID, SSID, and SVID of the device.

[0129] Step 2: When the BMC receives the command, parse and judge the information header to be _DEVID_. If the information header is _DEVID_, go to Step 3; otherwise, return 01, indicating that the information header is incorrect, and end.

[0130] Step 3: Add a structure to store the parsed information typedef struct{UINT16 Did; UINT16Vid; UINT16Ssid; UINT16Svid } DEVICE_MESSAGE; And add the variable _DevDelete, which is used to store the multiple Function device core identity information to be deleted; Step 4: Parse the information of the IPMI command in order, each field is two BYTE, in turn DID, VID, SSID, SVID, and store the information in DevDelete (store the first identity information).

[0131] Step 5: Add the variable DEVICE_MESSAGE *EepromDevList, which is used to store the multiple Function device core identity information that has been set.

[0132] Step 6: Get the multiple Function device core identity information from the specified location of the EEPROM as required and fill the returned information into EepromDevList (the fifth configuration list).

[0133] Step 7: Poll the information in EepromDevList, query whether there is matching information with DevDelete, if matching is successful, jump to the next step; otherwise, return information 05, indicating that there is no information to be deleted, jump to the end.

[0134] Step 8: Delete the DevDelete information in EepromDevList.

[0135] Step 9: Rewrite all information of EepromDevList in the specified location of the EEPROM and return information 00, indicating that the device information in the EEPROM has been successfully deleted.

[0136] Step 10: End.

[0137] Specifically, the BMC WEB adds a module, and the functions include adding, deleting, and querying functions.

[0138] This module realizes the adding, deleting, and querying of the multiple Function device core identity information on the BMC WEB, and the specific process is as follows: 1. Add device information, as shown in Figure 6 .

[0139] Step 1: Click the "Add" button.

[0140] Step 2: A pop-up input box appears, including DID, VID, SSID, SVID, COUNT prompt information and information setting box.

[0141] Step 3: After filling in the information, click the button.

[0142] Step 4: Click the "Cancel" button to exit the add setting box.

[0143] Step 5: Click the "Confirm" button to check all input information. All information must be numerical type. If the information is filled incorrectly, go to step 12; otherwise, go to the next step.

[0144] Step 6: The BMC stores the core identity information of the multi-Function device in the EEPROM specified location according to the protocol requirements, and generates IPMI commands according to the IPMI requirements of the added multi-Function device information and sends them to the BIOS.

[0145] Step 7: After receiving the command, the BIOS suspends the current task and immediately enters the interrupt handling program. Step 8: The interrupt handling program is called to parse the IPMI command according to the interaction specification and update the multi-Function device core identity information stored in the NVRAM (i.e. the first memory).

[0146] Step 9: After the modification is completed, the BIOS returns a response of 00 to the BMC and clears the interrupt flag.

[0147] Step 10: The front end displays a prompt box: "Add device successfully, need to restart the server to take effect".

[0148] Step 11: Provide "Restart immediately" and "Restart later" options.

[0149] Step 12: Prompt for detailed information of corresponding errors.

[0150] 2. Delete device information.

[0151] Step 1: Click the "Delete" button to pop up an input box, including DID, VID, SSID, SVID prompt information and information setting box. Step 2: After filling in the information, click the "Confirm" button to go to the next step; click the "Cancel" button to exit the add setting box. Step 3: Check all input information. All information must be numerical type. If the information is filled incorrectly, prompt for detailed information of corresponding errors; otherwise, go to the next step. Step 4: BMC finds and deletes the multi-Function device core identity information in EEPROM according to the protocol requirements. If the information exists, go to the next step; otherwise, prompt "no related device information found" and return; Step 5: Generate IPMI command according to the IPMI requirements for deleting multi-Function device core identity information and send it to BIOS; Step 6: After receiving the command, BIOS suspends the current task and immediately enters the interrupt processing program; Step 7: BIOS parses the IPMI command according to the interaction specification and deletes the multi-Function device core identity information stored in NVRAM; Step 8: After the modification is completed, BIOS returns a response of 00 to BMC and clears the interrupt flag; Step 9: The front end displays a prompt box: "device deletion successful, server needs to be restarted to take effect", and provides "immediate restart" and "restart later" buttons.

[0152] 2. Query device information.

[0153] Click the "Query" button, BMC returns all stored multi-Function device information according to the actual storage situation, and displays each piece of information on the BMC WEB interface.

[0154] (II) BIOS side.

[0155] Add the Complex Device Info Support module under SETUP; 1. Enter the BIOS SETUP path, Socket Configuration -> IIOConfiguration, add the Complex Device Info Support module, which contains the Add Device, Delete Device, and Show Device Message areas under the module. These areas are used to add, delete, and display the multi-Function device core identity information, respectively. 2, click Add Device, pop-up new settings page, set information including DID, VID, SSID, SVID, COUNT information, to set the core identity information of multi-function device, click "OK" button after setting, judge the validity of data. If valid, information redundancy and update the latest information to BIOS NVRAM (i.e. the first memory), and need to send the BMC through the information storage process IPMI command to save, save complete prompt "add device success, need to restart the server to take effect", and provide "immediate restart" and "later restart" button; at the same time, using information query command update Show Device Message information display area; click "cancel" button, do not do any settings and back to the previous page.

[0156] 3, click Delete Device, pop-up delete settings page, set information including DID, VID, SSID, SVID information, click "OK" button, judge the validity of data. If valid, update BIOS NVRAM according to the same way as IPMI command processing logic, and need to send the BMC through the information deletion process IPMI command, prompt "delete device success, need to restart the server to take effect" after processing, and provide "immediate restart" and "later restart" button; at the same time, using information query command update Show Device Message information display area; click "cancel" button, do not do any settings and back to the settings page; 4, Show Device Message information display, each time after executing Add Device, Delete Device function successfully, query all set device information through information query process, enter the page also update synchronously, and display on the page.

[0157] II, information acquisition stage, BIOS boot process, as shown in Figure 2 .

[0158] Step 1: server boot.

[0159] Step 2: add a structure body, used to store the core identity information of multi-function device set, typedef struct{UINT16Did; UINT16Vid; UINT16Ssid; UINT16Svid; UINT16Count DEVICE_MESSAGE; and define variable DEVICE_MESSAGE *DevList.

[0160] Step 3: Get the multi-Function device core identity information (first identity information) stored in the NVRAM (first memory) through the getVariable function, and store the read information into DevList (first configuration list).

[0161] Step 4: Execute the Pcieinfo module to poll all nodes on the PCIE link in turn, and get the DID, VID, SSID, and SVID information of the nodes in turn. If the acquisition is successful, go to the next step, otherwise, jump to step 8. Step 5: Compare the DID, VID, SSID, and SVID of the node with the information in DevList in turn. If the corresponding device information is found, go to step 6; otherwise, if it is an EP device, jump to step 8, and in other cases, jump to step 4 to continue searching.

[0162] It should be noted that EP is an endpoint device, that is, if the device is obtained, if it is in DevList, it needs to be specially processed, if it is not in the list, it is considered to be a specific device information that needs to be displayed, and can represent a specific in-place device.

[0163] Step 6: Get the corresponding Count value (count value) in DevList, and find the Countth device information with the same BUS (node) number in turn.

[0164] Step 7: Get all useful information of the device, including DID, VID, SSID, SVID, ClassCode, SubClassCode, MaxLinkWidth, MaxLinkSpeed, and all information stored according to the interaction specification. The information is the final information displayed to the outside of the device, get the next BUS number and jump to step 4 to continue searching; if not found, go to the next step.

[0165] Step 8: Get the device information of the first Function of the device as the core identity information of the device, and get all useful information of the Function device, including DID, VID, SSID, SVID, ClassCode, SubClassCode, MaxLinkWidth, MaxLinkSpeed, and all information stored according to the interaction specification. The information is the final information displayed to the outside of the device, and jump to step 4 to continue searching.

[0166] Step 9: After polling, the final aggregated storage information is transmitted to the BMC through H2B for PCIE device display and other functions, thereby completing the transmission of PCIE device information.

[0167] Step 10: End.

[0168] In summary, the embodiment of the application realizes automatic scanning and feature matching of device topology by defining a key device feature identifier-count value, dynamically locates the key device, so that the platform can flexibly adapt to more devices, break away from the hard coding restrictions, adapt to new devices without modifying the BIOS code, simplify the code library and reduce maintenance costs; can automatically adapt to firmware updates, avoid asset information acquisition errors, and protect device update freedom; improve the compatibility of servers for diversified intelligent devices, shorten the product launch cycle, and meet the rapid development needs of intelligent devices.

[0169] One embodiment of the application also provides a device information acquisition apparatus.

[0170] Figure 7 A schematic diagram of the device information acquisition apparatus according to one embodiment of the application.

[0171] As shown in Figure 7 , the device information acquisition apparatus is applied to a startup system and includes a first acquisition module 101, a first query module 102, a second acquisition module 103, and a third acquisition module 104. The first acquisition module 101 is configured to acquire first identity information of a target device on a device topology during a server startup process, store the first identity information of the target device to a pre-set first configuration list, the device topology includes a plurality of devices, and the device information level of the target device is higher than that of other devices on the device topology. The first query module 102 is configured to acquire second identity information of a device node on a device link of the server, query the first configuration list based on the second identity information of the device node, and determine whether the first identity information is consistent with the second identity information on the first configuration list. The second acquisition module 103 is configured to identify a count value in the second identity information if the second identity information is consistent with the first identity information, acquire a device topology of the device node, query the target device on the device topology based on the count value, and acquire device information of the target device. The third acquisition module 104 is configured to acquire a device topology of the device node if the second identity information is not consistent with the first identity information, take a first device of the device topology as the target device on the device topology, and acquire device information of the target device.

[0172] In some embodiments of the present application, the device information acquisition apparatus 10 of the embodiments of the present application further comprises a first updating module.

[0173] The first updating module is configured to, in response to an adding instruction of the device topology, set the first identity information of the target device on the device topology on the first setting page before acquiring the first identity information of the target device on the device topology, and determine whether the first identity information is valid after the setting is completed; if the first identity information is valid, update the first identity information to the first storage, generate a first command according to the first identity information, send the first command to the baseboard management controller, and the baseboard management controller saves the first identity information to the second storage in response to the first command; acquire feedback information of the baseboard management controller, and if a save completion identifier is identified in the feedback information, generate at least one of an adding success prompt and a server restart prompt.

[0174] In some embodiments of the present application, the device information acquisition apparatus 10 of the embodiments of the present application further comprises a first deleting module.

[0175] The first deleting module is configured to, in response to a deleting instruction of the device topology, set the first identity information of the target device on the device topology on the second setting page after generating at least one of the adding success prompt and the server restart prompt, and determine whether the first identity information is valid after the setting is completed; if the first identity information is valid, delete the first identity information from the first storage, generate a second command according to the first identity information, send the second command to the baseboard management controller, and the baseboard management controller deletes the first identity information from the second storage in response to the second command; acquire feedback information of the baseboard management controller, and if a delete completion identifier is identified in the feedback information, generate at least one of a deletion success prompt and a server restart prompt.

[0176] In some embodiments of the present application, the device information acquisition apparatus 10 of the embodiments of the present application further comprises a first parsing module.

[0177] The analysis module is configured to obtain a third command sent by the baseboard management controller before obtaining the first identity information of the target device on the device topology, the baseboard management controller sets the first identity information of the target device on the device topology on a third setting page in response to an adding instruction of the device topology, and generates the third command according to the first identity information after the setting is completed; the first identity information in the third command is identified, the first identity information is analyzed to obtain information identification and first device identification data, if the information identification is a pre-set target identification, a data structure body is established; the device identification data is stored by using the data structure body, the third identity information of the target device on the device topology is read from the first memory, and the third identity information is stored in a pre-set second configuration list; the second configuration list is queried based on the data structure body, if the query is successful, the third identity information is updated by using the first identity information, if the query fails, the first identity information is added to the second configuration list; the second configuration list is stored to the first memory, a save completion identification is generated, feedback information is generated according to the save completion identification, and the feedback information is sent to the baseboard management controller.

[0178] In some embodiments of the present application, the device information acquisition apparatus 10 of the embodiments of the present application further comprises a second analysis module.

[0179] The second analysis module is configured to obtain a fourth command sent by the baseboard management controller before obtaining the first identity information of the target device on the device topology, the baseboard management controller sets the first identity information of the target device on the device topology on a fourth setting page in response to a deleting instruction of the device topology, and generates the fourth command according to the first identity information after the setting is completed; the first identity information in the fourth command is identified, the first identity information is analyzed to obtain information identification and first device identification data, if the information identification is a pre-set target identification, a data structure body is established; the device identification data is stored by using the data structure body, the third identity information of the target device on the device topology is read from the first memory, and the third identity information is stored in a pre-set third configuration list; the third configuration list is queried based on the data structure body, if the query is successful, the corresponding third identity information is deleted from the first memory, the third configuration list is stored to the first memory, a deletion completion identification is generated, feedback information is generated according to the deletion completion identification, and the feedback information is sent to the baseboard management controller.

[0180] Figure 8 A schematic diagram of a device information acquisition apparatus according to another embodiment of the present application.

[0181] As Figure 8 shown, the device information acquisition apparatus 20 applied to a baseboard management controller comprises a fourth acquisition module 201, a third analysis module 202, a first storage module 203, a second query module 204 and a sending module 205.

[0182] The fourth acquisition module 201 is used to acquire the first command sent by the startup system, the startup system responds to the new device topology instruction, sets the first identity information of the target device on the device topology on the first setting page, and generates the first command based on the first identity information after the setting is completed. The third parsing module 202 is used to identify the first identity information in the first command, parse the first identity information to obtain information identifier and first device identifier data, and if the information identifier is a pre-set target identifier, then a data structure is established; The first storage module 203 is used to store device identification data using a data structure, read and obtain the fourth identity information of the target device on the device topology from the second memory, and store the fourth identity information into a pre-set fourth configuration list. The second query module 204 is used to query the fourth configuration list based on the data structure. If the query is successful, the fourth identity information is updated using the first identity information. If the query fails, the first identity information is added to the fourth configuration list. The sending module 205 is used to store the fourth configuration list to the second memory, generate a save completion identifier, generate feedback information based on the save completion identifier, and send the feedback information to the startup system. The startup system executes the above-mentioned device information acquisition device during the startup server process.

[0183] In some embodiments of this application, the device information acquisition device 20 of this application embodiment further includes: a second update module.

[0184] The second update module is used to respond to the device topology addition instruction before receiving the first command sent by the startup system, set the first identity information of the target device on the device topology on the third setting page, and determine whether the first identity information is valid after setting. If the first identity information is valid, the first identity information is updated to the second memory, a third command is generated based on the first identity information, and the third command is sent to the startup system. The startup system responds to the third command and saves the first identity information to the first memory. The startup feedback information is obtained. If the saving completion identifier is identified in the feedback information, at least one of the addition success prompt and server restart prompt is generated.

[0185] Figure 9 This is a schematic diagram of a device information acquisition apparatus according to yet another embodiment of this application.

[0186] like Figure 9 As shown, the device information acquisition device 30 is applied to the baseboard management controller and includes: a fifth acquisition module 301, a fourth parsing module 302, a second storage module 303 and a third query module 304.

[0187] The fifth obtaining module 301 is configured to obtain a second command sent by a starting system, and the starting system sets first identity information of a target device on a device topology in a second setting page in response to a deletion instruction of the device topology, and generates the second command according to the first identity information after the setting is completed. The fourth parsing module 302 is configured to identify the first identity information in the second command, parse the first identity information to obtain information identification and first device identification data, and establish a data structure if the information identification is a target identification set in advance. The second storage module 303 is configured to store the first device identification data by using the data structure, read fifth identity information of the target device on the device topology from a second storage, and store the fifth identity information to a fifth configuration list set in advance. The third query module 304 is configured to query the fifth configuration list based on the data structure, delete corresponding fifth identity information from the second storage if the query is successful, store the fifth configuration list to the second storage, generate a deletion completion identification, generate feedback information according to the deletion completion identification, and send the feedback information to the starting system.

[0188] In some embodiments of the present application, the device information obtaining apparatus 30 further comprises a second deletion module.

[0189] The second deletion module is configured to set the first identity information of the target device on the device topology in a fourth setting page in response to a deletion instruction of the device topology before obtaining the second command sent by the starting system, and judge whether the first identity information is valid after the setting is completed.

[0190] It should be noted that the description of the features in the embodiments of the device information obtaining apparatus can refer to the related description of the embodiments of the device information obtaining method, which will not be repeated here.

[0191] Embodiments of the present application also provide an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the device information obtaining method embodiments.

[0192] Those skilled in the art will further realize that the mere concepts, teachings, and embodiments described herein are merely meant to provide an enabling description of the applications and are not intended to limit the scope of the applications. Therefore, embodiments or examples described herein are not meant to be limiting, but merely to aid in the understanding of the overall more complete disclosure of the applications. Accordingly, those skilled in the art will recognize that modifications and variations of the more complete description herein can be resorted to without departing from the spirit and scope of the applications. Therefore, it is intended that the applications encompass all such modifications and variations as fall within the scope of the applications. All articles, patents, and other publications that have been cited herein are incorporated herein by reference for the teachings relevant to the sentence and / or paragraph in which the article, patent, and / or publication is mentioned.

[0193] The above describes in detail a device information acquisition method provided by the present application. The principles and implementation manners of the present application are described by applying specific examples herein. The above description of the embodiments is only for helping to understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for acquiring equipment information, characterized in that, The method is applied to the boot system, and the method includes the following steps: During server startup, the first identity information of the target device on the device topology is obtained, and the first identity information of the target device is stored in a pre-set first configuration list. The device topology includes multiple devices, and the device information level of the target device is higher than the device information level of other devices on the device topology. Obtain the second identity information of the device node on the device link of the server, and query the first configuration list based on the second identity information of the device node to determine whether the second identity information is consistent with the first identity information on the first configuration list; If the second identity information is consistent with the first identity information, then the count value in the first identity information is identified, the device topology of the device node is obtained, and the target device on the device topology is queried from the device topology based on the count value to obtain the device information of the target device; If the second identity information is inconsistent with the first identity information, then the device topology of the device node is obtained, the first device in the device topology is taken as the target device in the device topology, and the device information of the target device is obtained.

2. The device information acquisition method according to claim 1, characterized in that, Before obtaining the first identity information of the target device on the device topology, the following is included: In response to the new device topology command, the first identity information of the target device on the device topology is set on the first settings page. After the setting is completed, it is determined whether the first identity information is valid. If the first identity information is valid, the first identity information is updated to the first memory, a first command is generated based on the first identity information, and the first command is sent to the baseboard management controller. The baseboard management controller responds to the first command and saves the first identity information to the second memory. Obtain feedback information from the baseboard management controller. If the feedback information identifies a save completion flag, generate at least one of a successful addition message and a server restart message.

3. The device information acquisition method according to claim 2, characterized in that, After generating at least one of the success message for adding a new item and a server restart message, it also includes: In response to the deletion command of the device topology, the first identity information of the target device on the device topology is set on the second settings page. After the setting is completed, it is determined whether the first identity information is valid. If the first identity information is valid, the first identity information is deleted from the first memory, a second command is generated based on the first identity information, and the second command is sent to the baseboard management controller. The baseboard management controller responds to the second command and deletes the first identity information from the second memory. Obtain feedback information from the baseboard management controller. If the feedback information identifies a deletion completion flag, generate at least one of a deletion success message and a server restart message.

4. The device information acquisition method according to claim 1, characterized in that, Before obtaining the first identity information of the target device on the device topology, the following is included: The third command sent by the baseboard management controller is obtained. The baseboard management controller responds to the new device topology instruction, sets the first identity information of the target device on the device topology on the third setting page, and generates the third command based on the first identity information after the setting is completed. Identify the first identity information in the third command, parse the first identity information to obtain information identifier and first device identifier data, and if the information identifier is a pre-set target identifier, then establish a data structure; The device identification data is stored in the data structure, the third identity information of the target device on the device topology is read from the first memory, and the third identity information is stored in the pre-set second configuration list; The second configuration list is queried based on the data structure. If the query is successful, the third identity information is updated using the first identity information. If the query fails, the first identity information is added to the second configuration list. The second configuration list is stored in the first memory, a save completion identifier is generated, feedback information is generated based on the save completion identifier, and the feedback information is sent to the substrate management controller.

5. The device information acquisition method according to claim 1, characterized in that, Before obtaining the first identity information of the target device on the device topology, the following is included: The system receives a fourth command sent by the baseboard management controller. The baseboard management controller responds to the deletion instruction of the device topology, sets the first identity information of the target device on the device topology on the fourth setting page, and generates the fourth command based on the first identity information after the setting is completed. Identify the first identity information in the fourth command, parse the first identity information to obtain information identifier and first device identifier data, and if the information identifier is a pre-set target identifier, then establish a data structure; The device identification data is stored in the data structure, the third identity information of the target device on the device topology is read from the first memory, and the third identity information is stored in a pre-set third configuration list; If the query is successful, the corresponding third identity information is deleted from the first memory, the third configuration list is stored in the first memory, a deletion completion identifier is generated, feedback information is generated based on the deletion completion identifier, and the feedback information is sent to the baseboard management controller.

6. A method for acquiring equipment information, characterized in that, The method is applied to a baseboard management controller, wherein the method includes the following steps: The system receives the first command sent by the startup system, which responds to the new device topology instruction, sets the first identity information of the target device on the device topology on the first settings page, and generates the first command based on the first identity information after setting. Identify the first identity information in the first command, parse the first identity information to obtain information identifier and first device identifier data, and if the information identifier is a pre-set target identifier, then establish a data structure; The first device identification data is stored in the data structure, the fourth identity information of the target device on the device topology is read from the second memory, and the fourth identity information is stored in the pre-set fourth configuration list. Based on the data structure, query the fourth configuration list. If the query is successful, update the fourth identity information using the first identity information. If the query fails, add the first identity information to the fourth configuration list. The fourth configuration list is stored in the second memory, a save completion identifier is generated, feedback information is generated based on the save completion identifier, and the feedback information is sent to the startup system. During the startup process of the startup system starting the server, the device information acquisition method according to any one of claims 1-5 is executed.

7. The device information acquisition method according to claim 6, characterized in that, Before receiving the first command sent by the system startup, it also includes: In response to the new device topology command, the first identity information of the target device on the device topology is set on the third settings page. After the setting is completed, it is determined whether the first identity information is valid. If the first identity information is valid, the first identity information is updated to the second memory, a third command is generated based on the first identity information, the third command is sent to the startup system, and the startup system responds to the third command by saving the first identity information to the first memory. Obtain the startup feedback information. If the feedback information identifies a save completion flag, generate at least one of the following: a successful addition message and a server restart message.

8. A method for acquiring equipment information, characterized in that, The method is applied to a baseboard management controller, wherein the method includes the following steps: The system receives a second command sent by the startup system. The startup system responds to the deletion command of the device topology, sets the first identity information of the target device on the device topology on the second settings page, and generates a second command based on the first identity information after the setting is completed. Identify the first identity information in the second command, parse the first identity information to obtain information identifier and first device identifier data, and if the information identifier is a pre-set target identifier, then establish a data structure; The first device identification data is stored in the data structure, the fifth identity information of the target device on the device topology is read from the second memory, and the fifth identity information is stored in the pre-set fifth configuration list; Based on the data structure, the fifth configuration list is queried. If the query is successful, the corresponding fifth identity information is deleted from the second storage, the fifth configuration list is stored in the second storage, a deletion completion identifier is generated, feedback information is generated based on the deletion completion identifier, and the feedback information is sent to the startup system. During the startup process of the startup system starting the server, the device information acquisition method according to any one of claims 1-5 is executed.

9. The device information acquisition method according to claim 8, characterized in that, Before obtaining the second command sent by the startup system, the process also includes: In response to the deletion command of the device topology, the first identity information of the target device on the device topology is set on the fourth setting page. After the setting is completed, it is determined whether the first identity information is valid. If the first identity information is valid, the first identity information is deleted from the second memory, a fourth command is generated based on the first identity information, and the fourth command is sent to the startup system. The startup system responds to the fourth command and deletes the first identity information from the first memory. Obtain feedback information from the system startup. If the feedback information identifies a deletion completion flag, generate at least one of a deletion success message and a server restart message.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the device information acquisition method as described in any one of claims 1-9 when executing the computer program.

Citation Information

Patent Citations

  • Server and asset information obtaining method, providing method and device thereof

    CN115629825A

  • PCIe topology acquisition method and device

    CN116361220A

  • Hardware topology information processing method and device, equipment and medium

    CN119669296A

  • Asset information acquisition method and device, server, controller and medium

    CN120711094A

  • System and method for automatically updating BIOS setup options

    US20180248749A1