A method for controller adapter board card topology information and electronic device
By pre-storing formatted topology data on the board and having it automatically parsed by the controller, the cumbersome and error-prone topology configuration of the board is solved, enabling fast and reliable board adaptation and monitoring.
Patent Information
- Application Number
- CN202611701313.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-30
- Publication Date
- 2026-11-27
AI Technical Summary
In existing servers, the topology configuration information of the boards needs to be manually entered or the firmware is upgraded. This process is cumbersome, costly, and prone to errors, and it is difficult to quickly achieve compatibility with boards of different specifications.
By pre-storing formatted topology data on the board and having the controller directly read, verify, and parse it when connecting to the server, the driver and communication rules are automatically loaded, simplifying the adaptation process and reducing firmware iteration and manual maintenance costs.
It enables plug-and-play functionality for boards, shortens adaptation time, reduces the risk of misconfiguration, and improves compatibility with boards of different specifications and system stability.
Smart Images

Figure CN123185086A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and electronic device for a controller to adapt board topology information. Background Technology
[0002] In existing server scenarios, when a new board is connected, the board's topology configuration information usually needs to be manually entered into the controller's internal firmware by administrators, or the controller's firmware needs to be upgraded to complete the identification, adaptation, and monitoring of the board hardware. This approach is not only cumbersome, but also requires manpower to maintain the controller firmware or configuration parameters after each board model iteration and update, resulting in a long adaptation cycle. Furthermore, manual configuration is prone to errors and omissions. If the configuration is inconsistent with the actual board hardware, it will directly cause the controller to be unable to properly identify the board hardware, communication monitoring to be abnormal, and it will be difficult to quickly achieve compatibility with boards of different specifications. Summary of the Invention
[0003] This application provides a method and electronic device for a controller to adapt board topology information, so as to at least solve the technical problems in the related art where server controllers rely on manual input of topology configuration into the controller or manual firmware upgrades when adapting boards, which are cumbersome to adapt, have high maintenance costs, and are prone to configuration errors.
[0004] This application provides a method for a controller to adapt to board topology information, including: Obtain the device topology information of the board, perform format encapsulation processing according to the device topology information to generate topology data, and write the topology data into the board's memory; The server detects whether a board is connected by polling the controller. In response to a board being connected to the server, the server's controller reads the topology data stored in the board's memory. The controller performs a validity check on the read topology data; Upon successful verification, the topology data is parsed to obtain topology information, and the corresponding driver and communication rules are loaded to communicate with and monitor the devices on the board.
[0005] This application also provides an electronic device, including: a storage device for storing a computer program; and a processor for executing the computer program to implement the steps of the method for adapting the controller to the board topology information described above. Obtain the device topology information of the board, perform format encapsulation processing according to the device topology information to generate topology data, and write the topology data into the board's memory; The server detects whether a board is connected by polling the controller. In response to a board being connected to the server, the server's controller reads the topology data stored in the board's memory. The controller performs a validity check on the read topology data; Upon successful verification, the topology data is parsed to obtain topology information, and the corresponding driver and communication rules are loaded to communicate with and monitor the devices on the board.
[0006] This application pre-processes the device topology information of the board into a formatted package to generate topology data, which is then directly written into the board's own memory. When the board is connected to the server, the controller directly reads the pre-stored topology data in the board's local memory. After validity verification and parsing, the controller obtains the configuration parameters of the sensor devices. Based on the parsed configuration parameters, the controller loads the driver and communication rules to complete communication and monitoring. This solution eliminates the need for manual input of board configuration information into the controller and eliminates the need for iterative firmware upgrades for each board. The board only needs to complete the topology data writing during the production stage, which simplifies the board adaptation process and reduces the cost of firmware iteration and manual maintenance. At the same time, the topology data is stored locally on the board and follows the board's physical carrier. It can be directly read and used by the controller when the board is replaced or connected to different servers. Combined with validity verification, it can also reduce the risk of communication and monitoring anomalies caused by incorrect configuration and improve the controller's compatibility and adaptability to boards of different specifications. Attached Figure Description
[0007] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 An application environment diagram for a method of controller adapting board topology information provided in this application embodiment; Figure 2 This is a flowchart illustrating a method for a controller to adapt board topology information in one embodiment of this application; Figure 3 This is a flowchart illustrating the topology data writing process in one embodiment of this application; Figure 4 This is a flowchart illustrating the online topology data writing process in one embodiment of this application; Figure 5 This is a schematic diagram of the topology parsing and verification process in one embodiment of this application; Figure 6 This is a structural block diagram of the controller adapter board topology information device in one embodiment of this application; Figure 7 This is an internal structural diagram of a computer device in one embodiment of this application. Detailed Implementation
[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0010] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0011] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0012] The method for controller adaptation board topology information provided in this application can be applied to, for example... Figure 1 The application environment shown is illustrated. The server includes a controller, preferably a Baseboard Management Controller (BMC). The new type of board houses a memory and sensor devices. The memory stores device topology information. The controller connects to the memory via an I2C bus, establishing a communication connection between the controller and the memory. The controller also connects to a server via a network. The server has a board configuration information rule knowledge base and a knowledge base verification topology file, and the server is responsible for verification and signing. The server and server can be implemented using independent servers or a server cluster consisting of multiple servers.
[0013] Understandably, by adding hardware memory to the board or using existing memory, I2C configuration topology information can be stored in a standardized data format, and automated writing and verification, intelligent parsing and adaptation can be achieved, making the board plug-and-play.
[0014] During board production, R&D personnel output the I2C topology information corresponding to the board and fill it into a file according to a preset format, generating corresponding memory data. During board production, this data is either burned into the memory or written to the board online.
[0015] The memory space on the board is divided into fixed partitions for storing topology information. These partitions do not occupy other functional data areas of the board. The partition addresses are preset by the board at the factory, as shown in Table 1.
[0016] Table 1 Memory Partition Information
[0017] For ease of organization and parsing, the I2C topology data area is preferably described using JSON format. By leveraging the flexibility of the JSON data format, major components are abstracted into different modules for description. These modules can be nested, facilitating the description of the board's I2C topology relationships and ensuring compatibility and support for future additions of devices or types.
[0018] like Figure 2 As shown, embodiments of this application provide a method for a controller to adapt board topology information, including the following steps: Step S1: Obtain the device topology information of the board, perform format encapsulation processing according to the device topology information to generate topology data, and write the topology data into the memory of the board; Step S2: The server polls the controller to detect if any board is connected. In response to a board being connected to the server, the server's controller reads the topology data stored in the board's memory. Step S3: The controller performs a validity check on the read topology data. If the check passes, the topology data is parsed to obtain the configuration parameters of the sensor devices on the board. In step S4, the controller retrieves and loads the driver program and communication rules of the sensor device from the pre-stored driver library and communication rule library according to the configuration parameters, and performs communication and monitoring of the device on the board.
[0019] The process involves formatting and encapsulating the device topology information of the board to obtain topology data, which is then stored in the board's local memory. When the board is connected to the server, the server's controller directly reads the pre-stored topology data from the board. After validity verification and parsing, the configuration parameters of the sensor devices are obtained. Based on these configuration parameters, the driver program and communication rules are loaded to complete communication and monitoring. This approach eliminates the traditional method of relying on manual configuration input or controller firmware upgrades for board adaptation. The board only needs to have its topology data written in advance before it can be put into use, simplifying the board adaptation process and reducing the cost of firmware iteration and manual maintenance. The topology data follows the physical carrier of the board, and can be directly read by the controller even when the board is replaced or connected to different servers. At the same time, validity verification can filter out illegal topology data, reducing the risk of communication and monitoring anomalies caused by incorrect configurations and improving the controller's compatibility with different board specifications.
[0020] It is understandable that device topology information can be device cascade topology information.
[0021] In this embodiment, topology data is generated by format encapsulation processing based on device topology information, including: Obtain the preset structured data format; Get the preset storage partition rules; The original topology data is obtained by encapsulating the device topology information and the preset structured data format. The original topology data is partitioned and filled according to the preset storage partitioning rules, and then hash calculation and private key signing are performed to obtain the topology data.
[0022] Specifically, the device topology information is encapsulated using a preset structured data format to obtain the original topology data, thus achieving standardized organization of the topology information and facilitating unified parsing and recognition by the controller. The original topology data is then filled with preset memory partitioning rules to adapt to the pre-divided partition storage layout of the board's memory. Finally, hash calculation and private key signing are performed on the original topology data to provide verification credentials for subsequent legality verification. This enables the identification of tampering or damage to the topology data, thereby improving the integrity and security of the topology data stored in the memory.
[0023] In this embodiment, the preset structured data format includes a header field, a device data field, and a multiplexing device data field.
[0024] The I2C topology data area JSON format is defined as follows: Data header: JSON data header. Only one instance of this field is allowed in I2C topology data.
[0025] The data header format is as follows: "Version": "xx", / / Used for compatibility with different versions of topology data formats; "Batch": "xxxxxxxx", / / Corresponding board's PN; "Type": "xx", / / Corresponding to the type of the board; Device: A general device description used to describe the detailed device at the I2C bus level where the I2C device resides. It is represented as an array, which can describe multiple devices and can be expanded and added as needed. Default values are optional. The device field design is as follows, supporting multiple device fields: "Type": "Temperature Sensor", Device Type, temp indicates temperature sensor; "Address": xx, the I2C address corresponding to the device; "Name": "xxxxxx", Device Name; "Enabled Status": 1, indicating whether monitoring is required; 1 means enabled, 0 means disabled. The default is 1. "Power on / off status": 0, The power on / off conditions for enabling monitoring. 0 indicates monitoring is performed when the power is off, and 1 indicates monitoring is performed when the power is on. The default value is 0. "Monitoring period": x, the time period for monitoring this device, in seconds, the default value is 3; Multiplexer: A switch device used to describe I2C switch-related information on a board, including device information for the corresponding channel.
[0026] The multi-way switch field design is as follows, supporting multiple multi-way switch fields: "Type": "switch", device type, where switch indicates I2C switch; "Address": xx, the I2C switch address of the board; "Name": "xxxxx", Board I2C switch name; "Channel": The topology configuration of I2C devices in each channel of the board's I2C switch.
[0027] Under each channel, device configuration descriptions can be added according to the device field definition, supporting multiple channel number configurations: "Channel Number": 0, the board's I2C switch channel number; "Device": A list of I2C devices under this switch channel; Type: "Temp"; Address: xx; Name: "xxxxx".
[0028] Using the standard JSON data format makes it easier for developers to write and confirm configurations. Although it has the disadvantage of taking up more space compared to binary data formats, considering that commonly used storage devices are generally 32KB or larger, there is no problem with insufficient storage space when using the JSON format. In addition, it is easier to implement JSON expansion and parsing, and standard JSON library interfaces can be used for data parsing, reducing the difficulty of code development and maintenance.
[0029] In addition, the device field and multiplexer field can be nested and combined to intuitively represent the bus hierarchy and the correspondence between parent and child buses. This can clearly represent complex multi-level bus topologies. At the same time, by specifying the device type and combining the device address, the problem of different I2C devices with the same address on different boards or the same I2C device with different addresses can be solved. This decouples the I2C devices and I2C addresses on the board, making the board hardware design more flexible and convenient.
[0030] In this embodiment, the original topology data is obtained by encapsulating the device topology information and a preset structured data format, including: Retrieve the multi-channel switching device data field and equipment data field included in the preset structured data format; Based on the multiplexer device data field, at least a portion of the device data fields are nested within the multiplexer device data field to obtain a nested field configuration. During the encapsulation process, the nested field configuration is used to participate in the encapsulation, thereby obtaining the original topological data carrying the nested hierarchical relationship.
[0031] The data header fields include at least one of version, batch, and type fields; the device data fields include at least one of type, address, name, enable status, power on / off status, and monitoring cycle fields; and the multi-channel switching device data fields include at least one of type, address, name, and channel fields. Nested field configurations define the corresponding nested hierarchy, expressing the hierarchical topology relationship between the multi-channel switching device and its subordinate devices.
[0032] By using nested field configuration, device data fields are nested within the data fields of the multi-channel switching device, generating topology raw data with nested hierarchical relationships. This can completely restore the true hierarchical topology relationship between the multi-channel switching device and its subordinate sensor devices, avoiding the loss of hardware mounting hierarchy information in the flat topology description. This allows the controller to access and monitor according to the actual hardware hierarchy after parsing the topology raw data, preventing hardware access logic errors caused by missing topology hierarchy information.
[0033] After the board design is completed, the topology data is generated according to the following steps: S11. Analyze the I2C topology of the target board and extract information such as I2C address, device type, device model, and I2C switch.
[0034] S12. Generate topology data in JSON format according to the topology data area defined in this specification, calculate the data length and fill it into the topology length area.
[0035] S13. Calculate the HASH check value for the topology data area, sign the HASH check value using a private key paired with the public key built into the BMC, and fill the result into the HASH check area.
[0036] like Figure 3 As shown, during the topology data writing process, the board design is carried out sequentially, the board's I2C topology structure is sorted out, the topology length and topology data area are filled according to the preset structured data format, and the hash verification value of the topology data area is filled.
[0037] Topology data can be burned using either online or offline methods.
[0038] In this embodiment, during offline programming, the topology data is written into the board's memory, including: Obtain the external programming device, read the preset memory partitioning rules, and obtain the preset partition offset for each partition; Based on the topology data and preset partition offsets, the topology data is burned into the board's memory using an external burning device according to the preset partitions and preset partition offsets.
[0039] Offline programming is achieved using an external programming device. The topology data is programmed into the board memory according to the partition offset corresponding to the preset memory partitioning rules. The topology data can be pre-set during the board manufacturing stage without the need for the server controller to participate in the writing process, making it suitable for high-volume board manufacturing scenarios. Programming is strictly performed according to the partition offset, ensuring that the subsequent controller can read the valid topology data at the fixed partition position.
[0040] When burning files online, such as Figure 4 As shown, in this embodiment, writing topology data into the board's memory includes: Establish a communication connection between the server's controller and the board's memory; Read the field replaceable unit information of the server and the field replaceable unit information of the board; The controller communicates with the server via the network to obtain the board configuration information rule knowledge base in the server. Based on the field replaceable unit information of the server and the field replaceable unit information of the board, the controller queries the board configuration information rule knowledge base to obtain the topology generation rules. The controller traverses the sensor devices on the board according to the topology generation rules, and generates a topology file to be signed according to the topology generation rules; The controller sends the topology file to be signed to the server and receives the topology data after verification and signature from the server. Read the preset memory partitioning rules to obtain the preset partition offset; based on the verified and signed topology data and the preset partition offset, write the topology data online to the corresponding partition of the board's memory; Read the memory partition data after the write is completed, compare the read memory partition data with the topology data to check the write correctness, and obtain the comparison result. If the comparison result is inconsistent, the online write operation will be repeated. If the comparison still fails after the maximum number of retries, a write error alarm will be output. If the comparison result is consistent, the online write operation will be completed.
[0041] The system enables online programming of the board after it is assembled on the server. The controller reads the information of replaceable units on site, queries the board configuration information rule knowledge base to obtain the topology generation rules, traverses the sensor devices to generate a topology file to be signed, and submits it to the server for signature verification to ensure the compliance and reliability of the generated topology data. After writing is completed, the system executes readback comparison, write retry and exception alarm logic, which can identify memory write failure faults. Topology data generation and writing can be completed on the server site without disassembling the board, adapting to the business scenario of online operation and maintenance to update the topology and improving the on-site applicability of the solution.
[0042] Among them, the field replaceable unit information is FRU information.
[0043] The online programming solution consists of two parts: First, the controller is responsible for reading FRU information, traversing the board's I2C devices, generating I2C configuration topology files, and writing I2C configuration topology file data. Secondly, there is the server-side component that provides services to the outside world. This component is responsible for providing an interface to query the knowledge base of rules for I2C configuration information on the control boards, and for verifying and signing the I2C configuration topology files generated by the controller according to the rules. The server-side component is not responsible for generating I2C configuration topology data; it is only responsible for providing rule queries, verification, and signing from the knowledge base to ensure the compatibility of the production system.
[0044] The topology generation rules include at least one of the following: topology data format version, device identification features, and device access logic.
[0045] like Figure 5 As shown, in this embodiment, the server detects whether a board is connected by polling the controller, including: The server controller continuously polls and detects card access events to obtain the polling detection results; Based on the polling detection results, determine whether the board has been detected to be connected to the server.
[0046] The server controller continuously polls and detects card access events. It determines whether a card is connected to the server based on the polling detection results. It can capture card hot-swapping access actions in real time without the need for manual card detection. Once card access is detected, it automatically triggers the entire process of subsequent topology reading, verification, and adaptation to adapt to the actual operating conditions of server card hot-swapping and achieve automated card access detection.
[0047] In this embodiment, the server controller reads the topology data stored in the board's memory, including: The server controller reads the partition identifier area of the board's memory to obtain the partition identifier area read data; Read data from the partition identifier area, determine whether the partition identifier area is valid, and obtain the identifier validity determination result; If the identifier validity determination result is invalid, the controller system configuration parameters are read, and the controller system configuration parameters are used to determine whether automatic detection is allowed, and the detection permission determination result is obtained. If the detection permission determination result is that automatic detection is not allowed, an error alarm is output, and the server re-polles the controller to check whether a board is connected; If the detection permission determination result is that automatic detection is allowed, the server controller will detect the sensor devices of the detection board to obtain hardware detection characteristics; Obtain a pre-stored hardware device library, compare and identify the hardware detection features with the hardware device library, and obtain the sensor device attributes; Based on the sensor device attributes, detection topology data is generated, written into the board's memory, and the topology data stored in the memory is updated.
[0048] The server controller reads the partition identifier area of the board's memory according to the preset memory partitioning rules to obtain the partition identifier area read data.
[0049] Before formally reading the topology data, the partition identifier area is read and its validity is determined. In case of abnormal scenarios such as loss or corruption of topology data in the memory, the controller system configuration parameters determine whether to enable automatic detection. When automatic detection is enabled, the hardware of the board is scanned and identified to generate detection topology data to update the memory, realizing remedial adaptation in fault scenarios. When automatic detection is not enabled, an alarm is output and the process returns to the board access judgment process. This provides fault tolerance capability and can also rely on configuration to disable automatic detection to avoid unexpected hardware scanning, thus balancing the fault tolerance of the solution and the controllability of the configuration.
[0050] like Figure 5 As shown, in this embodiment, the controller performs a validity check on the read topology data, including: Read the topology length area of the memory, obtain the length of the topology data area, read the data in the topology data area, perform a hash calculation on the data in the topology data area, and obtain the locally calculated hash value; Read the hash verification area data to obtain the signature hash value; Compare the locally calculated hash value with the signature hash value, perform signature verification, and obtain the hash verification result; If the hash verification result is unsuccessful, an error alarm is output, and the server re-checks whether any cards are connected via polling through the controller; if the hash verification result is successful, the data header field is read from the topology data area. Obtain the set of supported topology format versions stored in the controller; compare the version field in the data header with the set of topology format versions to obtain the version verification result; if the version verification result is not supported, output an error alarm and re-check whether there is a board connected by polling the controller through the server. The batch field in the data header is compared with the batch information read from the field replaceable unit information of the board to obtain the field replaceable unit consistency verification result; if the field replaceable unit consistency verification result is inconsistent, an error alarm is output, and the server re-checks whether a board is connected by polling the controller. Parse the read topology data to obtain the board device list; traverse the actual sensor devices of the board, compare the board device list with the actual sensor device status to obtain the device presence verification result; if the device presence verification result indicates that the device described in the topology description does not exist, output an error alarm, and the server re-polles the controller to check if any board is connected. The verification is considered successful if the hash verification result, version verification result, field replaceable unit consistency verification result, and device in-situ verification result are all deemed to pass; otherwise, the verification is deemed unsuccessful.
[0051] The system sequentially performs multi-layered verification logic, including hash signature verification, topology format version verification, on-site replaceable unit consistency verification, and device presence verification. If the hash verification fails, the system stops reading untrusted data header fields. If any verification fails, an error alarm is output and the system returns to the board access judgment process. The system filters out illegal topology data that is damaged, tampered with, incompatible with versions, or mismatched with identities from multiple dimensions, including data integrity, format compatibility, board identity matching, and actual hardware presence. This avoids performing adaptation processing based on erroneous topology data and improves the overall reliability of the solution.
[0052] In this embodiment, the method further includes: When the version verification result indicates that the topology format version is higher than all versions in the controller's pre-stored supported topology format version set, the version information in the data header field and the field content of the topology data area are read to obtain the original content of the higher version topology. Obtain the version downgrade mapping rules stored in the controller, and perform field pruning and field mapping processing on the original content of the high version topology according to the version downgrade mapping rules to obtain compatible version topology data; Re-execute hash verification on the compatible version of the topology data to obtain the downgraded hash verification result; If the hash verification result passes after downgrading, the compatible version topology data will be used as the topology data for parsing; if the hash verification result fails after downgrading, an error alarm will be output, and the server will re-check whether any boards are connected by polling the controller.
[0053] When the version of the topology data stored on the board is higher than the highest version supported by the controller, the original content of the high-version topology is pruned and mapped according to the version downgrade mapping rules to generate compatible version topology data that the controller can recognize. After downgrading, hash verification is performed again to ensure data trustworthiness. In a mixed deployment scenario where hardware controller version iterations are not synchronized, high-version topology data still has the opportunity to be recognized and used by low-version controllers, thus broadening the cross-version compatibility of topology data. If the verification fails after downgrading, an alarm rollback is executed to avoid using the downgraded data for adaptation, ensuring the safety and reliability of the processing.
[0054] In this embodiment, the topology data is parsed to obtain topology information, and the corresponding driver program and communication rules are loaded, including: The topology data is parsed to obtain the bus level, the address and type of the devices on the board, the monitoring cycle and status information as topology information; Load the corresponding driver from the controller's pre-stored driver library according to the type of device on the board; Based on the bus level, the address of the device on the board, the monitoring cycle, and the status information, the corresponding communication rules are loaded from the communication rule base stored in the controller.
[0055] The devices on the board are sensors, such as temperature sensors, voltage sensors, current sensors, speed sensors, presence detection sensors, water leakage sensors, humidity sensors, and pressure sensors, which are also I2C devices or I2C equipment.
[0056] In this embodiment, communicating and monitoring the devices on the board includes: Obtain the list of board devices obtained from the parsed and read topology data, as well as the actual sensor devices on the board; Perform device consistency testing based on the board device list and the actual sensor devices on the board to obtain the device test results; If the device detection results indicate that the list of devices on the board is inconsistent with the actual sensor devices on the board, an error alarm will be output and the actual sensor devices on the board will be disabled.
[0057] After the board adaptation is completed and the communication monitoring phase begins, continuous device consistency checks are performed. The list of board devices obtained from topology parsing is compared with the actual sensor device status of the board. If an inconsistency is detected, an error alarm is output and the abnormal hardware unit is disabled. This prevents the controller from continuing to conduct invalid communication and monitoring of the abnormal hardware, thereby achieving continuous status monitoring after the adaptation is completed and improving the security of server hardware management.
[0058] In the aforementioned method for controller adaptation of board topology information, the device topology information of the board is pre-formatted and encapsulated to generate topology data, which is then directly written into the board's own memory. When the board is connected to the server, the controller directly reads the pre-stored topology data in the board's local memory. After validity verification and parsing, the configuration parameters of the sensor devices are obtained. The driver program and communication rules are loaded based on the parsed configuration parameters to complete communication and monitoring. This solution eliminates the need for manual input of board configuration information into the controller and eliminates the need for iterative firmware upgrades for each board. The board only needs to complete the topology data writing during the production stage, which simplifies the board adaptation operation, reduces the cost of firmware iteration and manual maintenance, and the topology data is stored locally on the board, following the board's physical carrier. It can be directly read and used by the controller when the board is replaced or connected to different servers. Combined with validity verification, it can also reduce the risk of communication and monitoring anomalies caused by incorrect configuration and improve the controller's compatibility and adaptation capabilities for boards of different specifications.
[0059] Compared with existing technologies, this application has the following advantages: the board adaptation time is shortened from the traditional 2 hours to less than 30 seconds, eliminating the need for manual configuration or firmware upgrades, and significantly improving adaptation efficiency; for online hot maintenance machines, it reduces the number of operation steps for maintenance personnel, avoids errors in manual parameter input, reduces server downtime for maintenance, and significantly reduces maintenance costs; the hash value signature verification mechanism prevents topology data tampering or transmission errors, and the hot-swappable function supports board replacement during server operation, enhancing system stability; it adopts a readable and scalable JSON data format and supports multiple versions of topology formats, which can adapt to different types of boards (storage expansion cards, management boards, etc.), has good scalability, and can automatically detect and monitor the I2C device topology of the board based on the I2C device library, greatly improving the compatibility with newly added boards.
[0060] This application supports memory partition management: the memory of the board is divided into 5 partitions (partition identifier area, topology length area, topology data area, hash verification area, and reserved area), and the topology relationship data corresponding to the board is written into the memory topology data partition; This application supports validity and legality verification: a HASH verification area is added, and the data in the HASH verification area is signed and verified. When loading data, BMC performs signature verification and HASH verification to ensure the integrity and legality of the data and prevent the data from being illegally tampered with.
[0061] This application supports online updates and online writing of topology data. The topology data area data is sent to the server, which performs rule verification and generates other storage partition data besides the topology data area. The server calculates the HASH value, signs it, and writes it into the storage online. If a write error occurs, the application will retry. If the write still fails after retrying, an alarm will be triggered.
[0062] This application supports BMC to automatically detect I2C devices on the board, and to traverse the board's I2C devices and generate topology data according to the rules retrieved from the server's board I2C configuration information rule knowledge base. The topology data is automatically generated, verified and signed by the server, and then written to the memory, so that the same board can be used with different models to support different configurations.
[0063] This application supports a standardized and easy-to-read data format. The data uses JSON format to describe the board topology data. The use of JSON format facilitates data reading and parsing. This format defines three different data types (data header field, device data field, and multiplexer device data field). The data header field is designed with three fields: version, batch, and type. The version is used to describe the topology data format version number, which can distinguish different topology formats and supports BMC compatibility with multiple versions of topology data. The device data field adds fields such as device type, device address, device name, polling cycle, monitoring enable status, and dependent power on / off status to describe relevant information and communication dependencies of hardware devices. It also allows some parameters to use default values, making the configuration more flexible. The multiplexer device data field adds type, name, address, and channel fields. The channel field describes the topology relationship of devices under the I2C switch, and the device data field and multiplexer device data field can be nested to represent I2C bus relationships such as parent bus and child bus. It can support describing more than two levels of complex bus relationships. This solution can decouple the I2C devices and I2C addresses on the board, making the board hardware design more flexible and convenient.
[0064] This application supports hot-swapping of circuit boards. Through the hot-swapping detection unit of the BMC, the connection status of the circuit boards is periodically detected to achieve real-time detection of the connection. After the circuit board is connected, the application automatically identifies and parses the valid data in the circuit board's memory (where the memory maintains a fixed address and is located at the top layer of the circuit board's I2C bus hierarchy). Based on detailed configurations such as device type, device address, device name, polling cycle, monitoring enable status, and dependent power-on / off status, the application loads the corresponding monitoring policies and drivers. For illegal data, the application issues fault alarms to prevent the circuit board data from being illegally tampered with.
[0065] This application supports an extensible data format. The BMC verifies the consistency between the topology data and the board by checking whether the batch field data in the data header of the memory topology is the same as the value of the specified field in the FRU. This prevents the writing of valid but incorrect topology data and further ensures the validity of the data. This application supports complete device management information. After parsing the topology data in the memory, the BMC sequentially checks whether the corresponding hardware devices can work properly based on detailed configurations such as device type, device address, device name, polling cycle, monitoring enable status, and dependent power-on / off status. If a device does not exist or cannot work properly, an error alarm is issued to ensure that all I2C devices on the board can work properly and to prevent hardware abnormalities on the board.
[0066] This application supports the verification function between the board topology and the actual device. After parsing the topology data, it checks whether the board device and the topology data are consistent. If they are inconsistent, it issues an alarm and disables the device.
[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0068] In one embodiment, such as Figure 6 As shown, a controller adapter board topology information device 10 is provided, including: a topology encapsulation writing module 1, a board access detection and reading module 2, a topology validity verification module 3, and a hardware adaptation monitoring module 4.
[0069] The topology encapsulation and writing module 1 is used to obtain the device topology information of the board, perform format encapsulation processing according to the device topology information to generate topology data, and write the topology data into the memory of the board.
[0070] The board access detection and reading module 2 is used by the server to detect whether a board is connected through polling by the controller. In response to a board being connected to the server, the server's controller reads the topology data stored in the board's memory.
[0071] The topology validity verification module 3 is used by the controller to perform validity verification processing on the read topology data.
[0072] The hardware adaptation monitoring module 4 is used to parse the topology data to obtain topology information in response to the successful verification, and load the corresponding driver and communication rules to communicate and monitor the devices on the board.
[0073] In this embodiment, topology data is generated by format encapsulation processing based on device topology information, including: Obtain the preset structured data format; Get the preset storage partition rules; The original topology data is obtained by encapsulating the device topology information and the preset structured data format. The original topology data is partitioned and filled according to the preset storage partitioning rules, and then hash calculation and private key signing are performed to obtain the topology data.
[0074] In this embodiment, the preset structured data format includes a data header field, a device data field, and a multiplexing device data field. Based on the device topology information and the preset structured data format, the data is encapsulated to obtain the original topology data, including: Retrieve the multi-channel switching device data field and equipment data field included in the preset structured data format; Based on the multiplexer device data field, at least a portion of the device data fields are nested within the multiplexer device data field to obtain a nested field configuration. During the encapsulation process, the nested field configuration is used to participate in the encapsulation, thereby obtaining the original topological data carrying the nested hierarchical relationship.
[0075] In this embodiment, writing topology data into the board's memory includes: Obtain the external programming device, read the preset memory partitioning rules, and obtain the preset partition offset for each partition; Based on the topology data and preset partition offsets, the topology data is burned into the board's memory using an external burning device according to the preset partitions and preset partition offsets.
[0076] In this embodiment, writing topology data into the board's memory includes: Establish a communication connection between the server's controller and the board's memory; The controller reads the field replaceable unit information from the server and the field replaceable unit information from the board; the controller communicates with the server through the network to obtain the board configuration information rule knowledge base from the server, and queries the board configuration information rule knowledge base based on the field replaceable unit information from the server and the field replaceable unit information from the board to obtain the topology generation rules. The controller traverses the sensor devices on the board according to the topology generation rules, and generates a topology file to be signed according to the topology generation rules; The controller sends the topology file to be signed to the server and receives the topology data after verification and signature from the server. Read the preset memory partitioning rules to obtain the preset partition offset; based on the verified and signed topology data and the preset partition offset, write the topology data online to the corresponding partition of the board's memory; Read the memory partition data after the write is completed, compare the read memory partition data with the topology data to check the write correctness, and obtain the comparison result. If the comparison result is inconsistent, the online write operation will be repeated. If the comparison still fails after the maximum number of retries, a write error alarm will be output. If the comparison result is consistent, the online write operation will be completed.
[0077] In this embodiment, the server detects whether a board is connected by polling the controller, including: The server controller continuously polls and detects card access events to obtain the polling detection results; Based on the polling detection results, determine whether the board has been detected to be connected to the server.
[0078] In this embodiment, the server controller reads the topology data stored in the board's memory, including: The server controller reads the partition identifier area of the board's memory to obtain the partition identifier area read data; Read data from the partition identifier area, determine whether the partition identifier area is valid, and obtain the identifier validity determination result; If the identifier validity determination result is invalid, the controller system configuration parameters are read, and the controller system configuration parameters are used to determine whether automatic detection is allowed, and the detection permission determination result is obtained. If the detection permission determination result is that automatic detection is not allowed, an error alarm is output, and the server re-polles the controller to check whether a board is connected; If the detection permission determination result is that automatic detection is allowed, the server controller will detect the sensor devices of the detection board to obtain hardware detection characteristics; Obtain a pre-stored hardware device library, compare and identify the hardware detection features with the hardware device library, and obtain the sensor device attributes; Based on the sensor device attributes, detection topology data is generated, written into the board's memory, and the topology data stored in the memory is updated.
[0079] In this embodiment, the controller performs a validity check on the read topology data, including: Read the topology length area of the memory, obtain the length of the topology data area, read the data in the topology data area, perform a hash calculation on the data in the topology data area, and obtain the locally calculated hash value; Read the hash verification area data to obtain the signature hash value; Compare the locally calculated hash value with the signature hash value, perform signature verification, and obtain the hash verification result; If the hash verification result is unsuccessful, an error alarm is output, and the server re-checks whether any cards are connected via polling through the controller; if the hash verification result is successful, the data header field is read from the topology data area. Obtain the set of supported topology format versions stored in the controller; compare the version field in the data header with the set of topology format versions to obtain the version verification result; if the version verification result is not supported, output an error alarm and re-check whether there is a board connected by polling the controller through the server. The batch field in the data header is compared with the batch information read from the field replaceable unit information of the board to obtain the field replaceable unit consistency verification result; if the field replaceable unit consistency verification result is inconsistent, an error alarm is output, and the server re-checks whether a board is connected by polling the controller. Parse the read topology data to obtain the board device list; traverse the actual sensor devices of the board, compare the board device list with the actual sensor device status to obtain the device presence verification result; if the device presence verification result indicates that the device described in the topology description does not exist, output an error alarm, and the server re-polles the controller to check if any board is connected. The verification is considered successful if the hash verification result, version verification result, field replaceable unit consistency verification result, and device in-situ verification result are all deemed to pass; otherwise, the verification is deemed unsuccessful.
[0080] In this embodiment, communicating and monitoring the devices on the board includes: Obtain the list of board devices obtained from the parsed and read topology data, as well as the actual sensor devices on the board; Perform device consistency testing based on the board device list and the actual sensor devices on the board to obtain the device test results; If the device detection results indicate that the list of devices on the board is inconsistent with the actual sensor devices on the board, an error alarm will be output and the actual sensor devices on the board will be disabled.
[0081] In the aforementioned controller adaptation board topology information device, the device topology information of the board is pre-formatted and encapsulated to generate topology data, which is then directly written into the board's own memory. When the board is connected to the server, the controller directly reads the pre-stored topology data in the board's local memory. After validity verification and parsing, the configuration parameters of the sensor devices are obtained. Based on the parsed configuration parameters, the driver program and communication rules are loaded to complete communication and monitoring. This solution no longer relies on manual input of board configuration information into the controller, nor does it require iterative firmware upgrades for each board. The board only needs to complete the topology data writing during the production stage, which simplifies the board adaptation operation, reduces the cost of firmware iteration and manual maintenance, and the topology data is stored locally on the board, following the board's physical carrier. When the board is replaced or connected to different servers, it can be directly read and used by the controller. Combined with validity verification, it can also reduce the risk of communication and monitoring anomalies caused by incorrect configuration and improve the controller's compatibility and adaptation capabilities for boards of different specifications.
[0082] For a description of the features in the embodiment corresponding to the controller adapting board topology information device, please refer to the relevant description of the embodiment corresponding to the controller adapting board topology information method, which will not be repeated here.
[0083] For a description of the features of the corresponding embodiment of the controller adapting board topology information device, please refer to the relevant description of the corresponding embodiment of the controller adapting board topology information method, which will not be repeated here.
[0084] Embodiments of this application also provide an electronic device, including a storage device and a processor, wherein the storage device stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described methods for adapting controller board topology information.
[0085] In one embodiment, the electronic device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores controller adaptation board topology information data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for providing controller adaptation board topology information.
[0086] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described methods for adapting controller board topology information.
[0087] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0088] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described methods for adapting controller board topology information.
[0089] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described methods for adapting controller board topology information.
[0090] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0091] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0092] The method and electronic device for controller adaptation board topology information provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A method for a controller to adapt to board topology information, characterized in that, include: Obtain the device topology information of the board, perform format encapsulation processing according to the device topology information to generate topology data, and write the topology data into the memory of the board; The server detects whether a board is connected by polling the controller. In response to a board being connected to the server, the server's controller reads the topology data stored in the board's memory. The controller performs a validity check on the read topology data; In response to successful verification, the topology data is parsed to obtain topology information, and the corresponding driver and communication rules are loaded to communicate with and monitor the devices on the board.
2. The method for controller adapting board topology information according to claim 1, characterized in that, The step of generating topology data by format encapsulation processing based on the device topology information includes: Obtain the preset structured data format; Get the preset storage partition rules; The original topology data is obtained by encapsulating the device topology information and the preset structured data format. The original topology data is partitioned and filled according to the preset memory partitioning rules, and hash calculation and private key signing are performed to obtain the topology data.
3. The method for controller adapting board topology information according to claim 2, characterized in that, The preset structured data format includes a header field, a device data field, and a multiplexing device data field. The encapsulation process based on the device topology information and the preset structured data format to obtain the original topology data includes: Obtain the multi-channel switching device data field and the device data field included in the preset structured data format; Based on the multiple switching device data field, at least a portion of the device data fields are nested within the multiple switching device data field to obtain a nested field configuration. During the encapsulation process, the nested field configuration is used to participate in the encapsulation, thereby obtaining the original topological data carrying the nested hierarchical relationship.
4. The method for controller adapting board topology information according to claim 2, characterized in that, The step of writing the topology data into the board's memory includes: Obtain an external programming device, read the preset memory partitioning rules, and obtain the preset partition offset for each partition; Based on the topology data and the preset partition offset, the topology data is burned into the memory of the board according to the preset partition and the preset partition offset by the external burning device.
5. The method for controller adapting board topology information according to claim 2, characterized in that, The step of writing the topology data into the board's memory includes: Establish a communication connection between the server's controller and the board's memory; Read the field replaceable unit information of the server and the field replaceable unit information of the board; The controller communicates with the server via the network to obtain the board configuration information rule knowledge base in the server. Based on the field replaceable unit information of the server and the field replaceable unit information of the board, the controller queries the board configuration information rule knowledge base to obtain the topology generation rules. The controller traverses the sensor devices of the board according to the topology generation rules, and generates a topology file to be signed according to the topology generation rules; The controller sends the topology file to be signed to the server and receives the topology data after verification and signature from the server. Read the preset memory partitioning rules to obtain the preset partition offset; based on the topology data after verification and signature and the preset partition offset, write the topology data online to the corresponding partition of the board's memory; Read the memory partition data after the write is completed, and compare the read memory partition data with the topology data to obtain the write correctness comparison result. If the comparison result is inconsistent, the online write operation is repeated. If the comparison still fails after the maximum number of retries, a write error alarm is output. If the comparison result is consistent, the online write operation is completed.
6. The method for controller adapting board topology information according to claim 1, characterized in that, The server detects whether the board is connected by polling the controller, including: The server's controller continuously polls and detects board access events to obtain the polling detection results; Based on the polling detection results, it is determined whether the board has been detected to be connected to the server.
7. The method for controller adapting board topology information according to claim 1, characterized in that, The process of the controller of the server reading the topology data stored in the memory of the board includes: The server's controller reads the partition identifier area of the board's memory to obtain the partition identifier area read data; Based on the data read from the partition identifier area, determine whether the partition identifier area is valid, and obtain the identifier validity determination result; If the validity determination result of the identifier is invalid, the controller system configuration parameters are read, and the controller system configuration parameters are used to determine whether automatic detection is allowed, and the detection permission determination result is obtained. If the detection permission determination result is that automatic detection is not allowed, an error alarm is output, and the system continues to determine whether a board is connected to the server. In response to the detection permission determination result being that automatic detection is allowed, the controller of the server detects the sensor devices of the board to obtain hardware detection characteristics; Obtain a pre-stored hardware device library, compare the hardware detection features with the hardware device library to identify sensor device attributes; Based on the sensor device attributes, detection topology data is generated, and the detection topology data is written into the memory of the board to update the topology data stored in the memory.
8. The method for controller adapting board topology information according to claim 1, characterized in that, The controller performs a validity check on the read topology data, including: Read the topology length area in the memory, obtain the length of the topology data area, read the data in the topology data area, perform a hash calculation on the data in the topology data area, and obtain the locally calculated hash value; Read the hash verification area data to obtain the signature hash value; Compare the locally calculated hash value with the signature hash value, perform signature verification, and obtain the hash verification result; If the hash verification result is unsuccessful, an error alarm is output, and the system continues to determine whether a board is connected to the server; if the hash verification result is successful, the data header field is read from the topology data area. Obtain the set of supported topology format versions pre-stored by the controller; compare the version field in the data header field with the set of topology format versions to obtain the version verification result; if the version verification result is not supported, output an error alarm and continue to determine whether the server has a board connected; The batch field in the data header is compared with the batch information read from the field replaceable unit information of the board to obtain the field replaceable unit consistency verification result; if the field replaceable unit consistency verification result is inconsistent, an error alarm is output, and it is further determined whether the server has a board connected. The topology data is parsed and read to obtain a list of board devices; the actual sensor devices of the board are traversed, and the on-site status of the board device list and the actual sensor devices is compared to obtain the device on-site verification result; if the device on-site verification result indicates that the device described in the topology description does not exist, an error alarm is output, and the server is further judged to see if a board is connected. The verification is considered successful if the hash verification result, the version verification result, the field replaceable unit consistency verification result, and the device in-situ verification result are all deemed to pass; otherwise, the verification is deemed unsuccessful.
9. The method for controller adapting board topology information according to claim 8, characterized in that, When communicating with and monitoring the devices on the board, the following are included: Obtain the list of board devices obtained by parsing and reading the topology data, as well as the actual sensor devices on the board; Perform device consistency testing based on the board device list and the actual sensor devices on the board to obtain device testing results; If the device detection results indicate that the list of devices on the board is inconsistent with the actual sensor devices on the board, an error alarm is output and the actual sensor devices on the board are disabled.
10. An electronic device, characterized in that, include: Storage devices are used to store computer programs; A processor, configured to implement the steps of the method for adapting board topology information as claimed in any one of claims 1 to 9 when executing the computer program.
