Management controller bus adaptation method and electronic device
By establishing a serial bus connection between the management controller and the interface chip, and dynamically configuring the master and slave device roles, the problem of the serial interface not being able to connect directly to the management controller is solved, enabling stable and convenient device management and access, and providing a reliable backup solution in network-free environments.
Patent Information
- Application Number
- CN202511367667.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-24
AI Technical Summary
In the existing technology, serial interfaces cannot directly establish an effective connection with management controllers, which limits their application in the field of management controllers and the ease of operation for different types of devices.
The system establishes a serial bus connection between the management controller and the interface chip, identifies the action data of the target device, dynamically configures the master and slave device roles, and loads the corresponding drivers to realize the serial bus interface function, including identifying the device type and loading the serial bus device controller driver or the host controller interface driver.
It achieves stability and convenience of serial bus connection, supports management controller to access and manage devices in network-free environments, provides reliable backup solutions, reduces network dependency risks, and improves the flexibility and security of device management.
Smart Images

Figure CN120872877B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of management controller, in particular to a management controller bus adaptation method and electronic equipment. BACKGROUND
[0002] In the electronic information industry, the serial interface has been developed relatively mature, which can realize high-speed data transmission and high-power transmission. When considering the application of serial interface in the management controller, theoretically, various practical functions can be realized by means of its characteristics, not only can provide more convenient ways for users to access and manage the controller, but also can help the management controller itself to expand the device connection range. However, in actual application, it is not possible to directly establish an effective connection between the serial interface and the management controller, which to some extent limits the full play of the advantages of the interface in the field of management controller, and also hinders the differentiated operation of the management controller to different types of devices. SUMMARY
[0003] The present application provides a management controller bus adaptation method and electronic equipment, which can flexibly configure master and slave device roles to realize serial bus interface function by identifying device types, and ensure stable interaction of serial bus connection.
[0004] The present application provides a management controller bus adaptation method, the management controller is connected with the interface chip through the serial bus; the interface chip is connected with the target device through the serial bus; the method is used for the management controller, and includes:
[0005] reading the information of the interface chip, and obtaining the action data of the target device from the information of the interface chip; the action data is data related to insertion action and removal action;
[0006] when the current action of the target device is determined as the insertion action according to the obtained action data, identifying the type of the target device through the interface chip;
[0007] when the type of the target device is identified as the access device, loading the serial bus device controller driver integrated in itself, configuring itself as the slave device of the serial bus, and providing the target device with access;
[0008] when the type of the target device is identified as the accessed device, loading the host controller interface driver integrated in itself, configuring itself as the master device of the serial bus, and managing and accessing the target device.
[0009] The present application also provides an electronic equipment, which includes a memory for storing a computer program, and a processor for executing the computer program to realize the steps of the above-mentioned management controller bus adaptation method.
[0010] In the management controller bus adaptation method of the application, the management controller establishes a connection with the interface chip through a serial bus; the interface chip establishes a connection with the target device through the serial bus; the management controller first acquires the action data of the target device by reading the interface chip information to determine whether it is inserted, and after determining that the current action of the target device is an insertion action, the type of the target device is identified through the interface chip; when the type of the target device is identified as an access device, the serial bus device controller driver integrated in itself is loaded, and itself is configured as a slave device of the serial bus for the target device to access; when the type of the target device is identified as an accessed device, the host controller interface driver integrated in itself is loaded, and itself is configured as a master device of the serial bus to manage and access the target device. In this way, after identifying the device type, the master-slave role is dynamically switched through differential driving loading, when the access device is identified, the serial bus device controller driver is loaded and configured as a slave device, which ensures that the access device can smoothly access the controller when it is a master device, meets the standard requirements of master-slave communication, and avoids role conflicts; when the accessed device is identified, the host controller interface driver is loaded and configured as a master device, so that the controller can actively manage and access the target device without relying on external master device coordination, which widens the application scenarios of device management. The overall method can effectively realize the serial bus interface function, improve the stability and management convenience of serial bus communication, not only allows users to access the management controller in a scenario without connecting to the network, but also provides a reliable backup solution for connecting and debugging the management controller when the network environment fails or the network function of the management controller is abnormal, avoiding management interruption caused by network problems; it can also support the management controller to run independently without network, reduce the security risks caused by network access, and ensure the stability and interaction efficiency of the serial bus connection through precise adaptation of the drivers and role configurations of different devices, providing more flexible, safe and reliable protection for the access and management of the management controller.
[0011] In addition, the application also provides an electronic device for the management controller bus adaptation method, which has the same or corresponding technical features as the above-mentioned management controller bus adaptation method and the same effects. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0013] Figure 1 The flowchart of the management controller bus adaptation method provided by the embodiments of the application is shown in the figure.
[0014] Figure 2This is a schematic diagram of the architecture corresponding to the management controller bus adaptation method provided in the embodiments of the present invention;
[0015] Figure 3 A detailed flowchart of the management controller bus adaptation method provided in this embodiment of the invention;
[0016] Figure 4 This is a schematic diagram of the structure of the management controller bus adapter provided in an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0018] It should be noted that, in the description of this invention, 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 a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0019] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] The specific application environment architecture or specific hardware architecture on which the execution of the management controller bus adaptation method depends is described here.
[0021] This invention provides a management controller bus adaptation method, and the method is described in detail below with reference to its execution flow. In this invention, the management controller is connected to an interface chip via a serial bus; the interface chip is connected to the target device via a serial bus. Figure 1 A flowchart of the management controller bus adaptation method provided in the embodiments of the present invention is shown below. Figure 1 As shown, this method is used to manage the controller and includes:
[0022] S101. Read the information from the interface chip and obtain the action data of the target device from the information of the interface chip. The action data here refers to the data related to the insertion action and the removal action.
[0023] It should be noted that the management controller of the present invention can be a board manager controller (BMC) or other management controllers, and no limitation is made here.
[0024] Figure 2 This is a schematic diagram of the architecture corresponding to the management controller bus adaptation method provided in an embodiment of the present invention. For example... Figure 2 As shown, the management controller connects to the interface chip via a serial bus; the interface chip connects to the target device via a serial bus. The serial bus can be a Universal Serial Bus (USB) or other types of serial buses.
[0025] The interface chip can be a Type-C (USB Type-C, a USB hardware interface specification) chip, which features reversible plugging, high transmission speed, and strong power supply capabilities; it can also be other types of interface chips, without limitation here. As the connection hub between the management controller and the target device, the interface chip records the target device's physical interactions (such as plugging and unplugging actions) or signal changes. The management controller reads this information to further determine whether the device is connected and whether its status is normal, providing the initial basis for subsequent device type identification and master / slave role configuration, which is a prerequisite for achieving dynamic adaptation. The BMC's data link can be a connection between USB and the Type-C chip.
[0026] S102. Based on the acquired action data, when it is determined that the current action of the target device is an insertion action, the type of the target device is identified through the interface chip.
[0027] In step S102 of this invention, the management controller determines whether the target device has completed physical access, i.e., whether it is in an insertion state, based on the action data obtained in step S101. Only when it is determined that the device is in an insertion state is the type identification and role configuration process initiated. Based on confirming that the target device has been inserted, this invention further obtains the device's characteristic information through the interface chip. This characteristic information may include at least one or a combination of the device's role characteristics in communication interaction, protocol behavior, and preset identifiers. Based on this characteristic information, accurate identification of the target device type is achieved.
[0028] S103. When the target device is identified as an access device, the internally integrated serial bus device controller driver is loaded, and the device is configured as a slave device of the serial bus for access by the target device.
[0029] It's important to note that the serial bus device controller is the core control device that manages and coordinates data interaction between the serial bus and connected devices. When the target device is identified as an access device (i.e., a device actively initiating access), the management controller loads its internally integrated serial bus device controller driver and proactively configures itself as a slave device. This conforms to the interaction logic of an access device initiating access as a master device, ensuring that the access device can successfully access and control the management controller. This adheres to the master-slave communication specifications of the serial bus while also meeting the management needs of the access device for the management controller, achieving efficient communication adaptation for specific device types. In practical applications, the access device can be a computer or other devices.
[0030] S104. When the target device is identified as an accessed device, load the host controller interface driver integrated within itself and configure itself as a master device of the serial bus to manage and access the target device.
[0031] It's important to note that the host controller interface refers to the hardware interface and associated control logic that manages data transmission between the master device and external slave devices. When the target device is identified as a passively responding device, the management controller loads the integrated host controller interface driver, configuring itself as the master device. This conforms to the bus communication rules for master devices managing slave devices, ensuring the management controller can actively manage and access the accessed device. This on-demand master device configuration adapts to the interaction needs of the accessed device while ensuring compatible management of multiple types of peripherals through unified host control logic. In practical applications, the accessed device can be a wireless device, a removable storage device, or other devices.
[0032] In the management controller bus adaptation method provided in this embodiment of the invention, the management controller establishes a connection with the interface chip through a serial bus; the interface chip establishes a connection with the target device through a serial bus; the management controller first obtains the target device's action data by reading the interface chip information to determine whether it is inserted; after determining that the target device's current action is an insertion action, it identifies the type of the target device through the interface chip; when the target device is identified as an access device, it loads its internally integrated serial bus device controller driver and configures itself as a slave device of the serial bus for access by the target device; when the target device is identified as an accessed device, it loads its internally integrated host controller interface driver and configures itself as a master device of the serial bus to manage and access the target device. After identifying the device type, this approach uses differentiated driver loading and dynamic master-slave role switching. When a device is identified as an access device, the serial bus device controller driver is loaded and configured as a slave device. This ensures that the access device can smoothly access the controller when acting as a master device, meeting the standard requirements of master-slave communication and avoiding role conflicts. When a device is identified as a accessed device, the host controller interface driver is loaded and configured as a master device. This allows the controller to actively manage and access the target device without relying on external master devices for coordination, broadening the applicable scenarios for device management. This overall approach effectively implements the serial bus interface function, improving the stability and ease of management of serial bus communication. It allows users to access the management controller without a network connection and serves as a reliable backup solution for connecting and debugging the management controller in case of network failures or abnormal network functionality, preventing management interruptions due to network issues. It also supports the management controller operating independently without a network, reducing security risks associated with network access. Furthermore, by accurately adapting the drivers and role configurations of different devices, it ensures the stability and efficiency of serial bus connections, providing more flexible, secure, and reliable protection for the access and management of the management controller.
[0033] Furthermore, in specific implementations, in the management controller bus adaptation method provided in the embodiments of the present invention, the management controller integrates a serial bus functional component; such as... Figure 2 As shown, the serial bus functional components may include a serial bus device controller and a high-speed serial bus master device controller interface.
[0034] In implementation, the serial bus functional component can be a USB functional component, which can act as a slave device (such as a serial bus device controller) or a master device (such as a high-speed serial bus master controller interface). The serial bus device controller can be a USB device controller (UDC). The high-speed serial bus master controller interface can be an enhanced host controller interface (EHCI).
[0035] Step S103: When the target device is identified as an access device, load the internally integrated serial bus device controller driver and configure itself as a slave device of the serial bus for access by the target device. Specifically, this may include: when the target device is identified as an access device, determining that it switches to slave mode, loading the serial bus device controller driver, initializing the serial bus functional components as slave devices of the serial bus, setting the target device as the master device of the serial bus, and using the serial bus device controller to cooperate with the target device to complete data transmission.
[0036] In implementation, taking a computer as the access device as an example, when the inserted target device is a computer, the management controller switches to slave mode, loads the serial bus device controller driver, initializes the serial bus functional components as slave devices, and uses the computer as the master device for data interaction. This accurately matches the master-slave communication needs between the computer and the management controller, ensuring efficient access and control of the management controller by the computer, guaranteeing the stability and compatibility of serial bus data interaction, and realizing rapid response of role switching through the internally integrated serial bus functional components. This provides technical support for reliable communication between the computer and the management controller and improves the adaptation efficiency of serial bus connections.
[0037] Accordingly, when step S104 identifies the target device as an accessed device, it loads the host controller interface driver integrated within itself and configures itself as a master device of the serial bus to manage and access the target device. Specifically, it may include: when the target device is identified as an accessed device, determining that it switches to master device mode, loading the driver for the high-speed serial bus master device controller interface, initializing the serial bus functional components as the master device of the serial bus, treating the target device as a slave device of the serial bus, and managing and accessing the target device using the high-speed serial bus master device controller interface.
[0038] In implementation, when the inserted target device is an accessed device, the master device mode is switched, the high-speed serial bus master device controller interface driver is loaded, the serial bus functional components are initialized as the master device, and the target device is set as a slave device for identification and management. This precisely matches the management controller's control requirements for the accessed device. Based on the characteristics of the high-speed serial bus master device controller interface, the speed of target device identification and the efficiency of management are ensured, and the stability and compatibility of serial bus communication are guaranteed. The flexible switching of the master device role is realized through the internally integrated serial bus functional components, avoiding the cost of additional hardware adaptation. This provides technical support for the management controller to uniformly and reliably control multiple types of accessed devices, and effectively improves the adaptation flexibility and management efficiency of serial bus connections.
[0039] Furthermore, in a specific implementation, in the above-mentioned management controller bus adaptation method provided in the embodiments of the present invention, before executing step S101 to read the information of the interface chip, it may further include: setting the drivers of the serial bus device controller and the high-speed serial bus master device controller interface to manual loading mode, so as to compile the drivers of the serial bus device controller and the high-speed serial bus master device controller interface into a serial bus device controller kernel module and a high-speed serial bus master device controller interface kernel module respectively through the kernel.
[0040] In implementation, the management controller includes a management controller chip and management controller firmware. The drivers for both the serial bus device controller and the high-speed serial bus master device controller interfaces of the management controller chip are set to manual loading mode. The kernel of the management controller chip can compile these two into independent kernel modules. The purpose of this design is to allow the user-space code (i.e., the management controller code) to load or unload these two kernel modules as needed. This avoids the drivers consuming additional system resources due to forced kernel startup. The corresponding modules are only loaded when the management controller needs to switch master / slave device roles, achieving on-demand resource allocation and reducing the operational burden on the management controller kernel.
[0041] Furthermore, in specific implementation, in the above steps, loading the driver for the serial bus device controller and initializing the serial bus functional components as slave devices of the serial bus can specifically include: loading the kernel module of the serial bus device controller, activating the hardware functions and protocol adaptation capabilities of the serial bus device controller through the kernel module, and enabling the serial bus device controller to enter the slave device working state.
[0042] Accordingly, the driver for the high-speed serial bus master device controller interface is loaded, and the serial bus functional components are initialized as the serial bus master device. Specifically, this may include: loading the high-speed serial bus master device controller interface kernel module, activating the hardware functions and protocol adaptation capabilities of the high-speed serial bus master device controller interface through the high-speed serial bus master device controller interface kernel module, and enabling the high-speed serial bus master device controller interface to enter the master device working state.
[0043] In implementation, if the currently inserted device is a computer, the management controller calls the serial bus device controller kernel module to load the serial bus device controller driver. At this time, the management controller's serial bus module is initialized by the kernel driver as a slave device on the serial bus, and this slave device will be recognized by the computer's device manager. If the inserted device is an accessed device (such as a removable storage device or a wireless device), the management controller uses the high-speed serial bus master device controller interface kernel module to load the high-speed serial bus master device controller interface driver. At this time, the management controller's serial bus module is initialized by the kernel driver as a master device on the serial bus. The management controller, acting as the master device, can then manage and access the inserted target device. This invention activates the corresponding hardware functions and protocol adaptation capabilities by separately calling the serial bus device controller kernel module and the high-speed serial bus master device controller interface kernel module, enabling the serial bus device controller to enter slave mode and the high-speed serial bus master device controller interface to enter master mode. This allows hardware functions to be enabled on demand, avoiding resource waste, and ensures that communication under different roles conforms to the serial bus specification. It achieves precise adaptation and stable interaction between the management controller and the accessed / accessed devices, improving the flexibility and reliability of the serial bus functionality.
[0044] Taking Type-C as the interface chip as an example, this invention implements Type-C functionality on the management controller, allowing users to connect the management controller to the access device directly via a Type-C data cable. This Type-C connection enables users to access the management controller without a network connection. It serves as a backup solution for connecting and debugging the management controller when network issues arise or the management controller's network functionality malfunctions. It also eliminates the need for the management controller to be connected to the network, enhancing security.
[0045] Furthermore, in a specific implementation, the management controller bus adaptation method provided in the embodiments of the present invention may further include, after initializing the serial bus functional component as a slave device of the serial bus, configuring the slave device of the serial bus as a serial bus network card; setting a static Internet Protocol address for the serial bus network card so that the access device loads a new network card driver for the identified slave device of the serial bus, and setting the Internet Protocol address of the new network card to the same as the static Internet Protocol address of the serial bus network card.
[0046] In implementation, the management controller of this invention can configure the slave device of the serial bus as a serial bus network card and set the Internet Protocol (IP) address to a static IP address (e.g., IP: 192.168.0.100, subnet mask: 255.255.255.0). This serial bus network card is the network on the management controller side, coexisting with the dedicated management port and shared management port of the management controller. Users can connect to the management controller through the serial bus network. When the access device loads the network card driver for the identified serial bus slave device, a new network card will be added to the network device of the access device. The IP address of this network card will be set to the same network segment as the aforementioned serial bus (e.g., IP: 192.168.0.200, subnet mask: 255.255.255.0). Then, the access device can use the IP address (192.168.0.100) of the management controller's serial bus network card to access the management controller (including logging into the webpage, using the Secure Shell protocol, sending commands to the intelligent platform management interface, and all other operations on the management controller). This allows the access device to automatically load the new network card driver and synchronize address settings after recognition, simplifying the network layer adaptation process between the access device and the management controller, ensuring a stable network connection is established via the serial bus, without relying on the actual network environment, and improving connection compatibility and ease of use.
[0047] Furthermore, in a specific implementation, in the above-described management controller bus adaptation method provided in the embodiments of the present invention, when the accessed device is a wireless (Wi-Fi) device, after configuring itself as the master device of the serial bus, it may further include: calling the driver of the wireless device to initialize the wireless device, initializing the wireless device as a network card; setting an Internet Protocol address for the initialized network card so that the accessing device can access the management controller wirelessly.
[0048] In practice, the management controller can use the command to list the driver modules to view the models of the currently connected serial bus devices. If the model is determined to be a wireless network card chip, it indicates that a wireless device has been connected; otherwise, it indicates that a removable storage device has been connected. Figure 3A detailed flowchart of the management controller bus adaptation method provided in this embodiment of the invention is shown below. Figure 3 As shown, when the inserted accessed device is a wireless device, the management controller, after being configured as the master device, initiates the wireless device processing flow. Specifically, this involves calling the driver to initialize the wireless device as a network card and setting its Internet Protocol address, enabling the accessing device to access the management controller wirelessly. This expands the management controller's wireless connectivity capabilities and provides a flexible wireless access path for the accessing device, enhancing the convenience and adaptability of device interaction. Taking a Type-C interface chip as an example, the management controller can configure the inserted Type-C wireless device as its own wireless LAN, allowing users to connect to the management controller via a wireless network, providing users with a more convenient and secure access method.
[0049] Furthermore, in a specific implementation, in the above-described management controller bus adaptation method provided in the embodiments of the present invention, when the accessed device is a removable storage device (such as a USB flash drive), after configuring itself as the master device of the serial bus, it may further include: calling a mount command to bind the removable storage device; after binding, recognizing the removable storage device as a block device and generating a device node with a set naming format in the device file system; the device node serving as the interface for interaction between the management controller and the removable storage device; and using the device node to perform data read and write operations on the removable storage device.
[0050] In implementation, such as Figure 3 As shown, when the inserted accessed device is a removable storage device, after the management controller is configured as the master device, it starts the removable storage device processing flow. Specifically, it can call the mount command to bind the removable storage device. After binding, the removable storage device will appear as a hard disk device in the management controller's device directory. At this time, the management controller can write or read data to the removable storage device. In this way, by binding the removable storage device as its own storage area, the management controller can import or export files to and from the management controller. It can also be used as the management controller's storage disk to store large files such as logs and temporary files, providing convenience for users and solving the problem of small storage space in embedded systems such as management controllers. This allows the management controller to efficiently utilize the removable storage device for data storage or transmission, improving the convenience and reliability of data interaction.
[0051] Furthermore, in specific implementations, in the above-described management controller bus adaptation method provided in the embodiments of the present invention, such as... Figure 2As shown, the management controller can connect to the interface chip via the Inter-Integrated Circuit (I2C) bus. For example, the BMC can connect to the Type-C chip via the I2C bus as a monitoring link, allowing the BMC to read and set information from the Type-C chip through the I2C bus.
[0052] Step S101 reads the information of the interface chip, which may specifically include: reading the information in the first register of the interface chip using the I2C bus.
[0053] Step S103 identifies the type of the target device through the interface chip, which may specifically include: using the I2C bus to read the information of the target device from the second register of the interface chip to identify the type of the target device.
[0054] In implementation, the management controller connects to the interface chip via the I2C bus and reads the first and second registers of the interface chip to obtain information about the chip itself and the target device type. Because the I2C bus itself has the characteristics of simple structure, few pins, and stable communication, it can reduce the hardware complexity of the connection between the management controller and the interface chip. At the same time, by reading different information from the registers, precise partitioning of data acquisition can be achieved, which not only ensures the accuracy of obtaining basic information from the interface chip, but also efficiently identifies the target device type. This provides reliable data support for the management controller to dynamically adapt to master-slave roles and load corresponding drivers, thus improving the efficiency and stability of device connection and information interaction.
[0055] Furthermore, in a specific implementation, the management controller bus adaptation method provided in the embodiments of the present invention may further include: when it is determined that the current action of the target device is a removal action, obtaining the type of the target device based on the recorded data of the target device before removal; when the type of the target device is obtained as an access device, closing the serial bus network card connection channel; when the type of the target device is obtained as an accessed device and the accessed device is a wireless device, unloading the relevant driver of the wireless device; when the type of the target device is obtained as an accessed device and the accessed device is a removable storage device, unloading the storage partition.
[0056] During implementation, when a target device is in a removal state, it is either shut down or removed. The management controller determines the device type based on the data recorded before removal and performs targeted operations such as disabling the serial bus network card connection channel, uninstalling the wireless chip driver, or uninstalling the storage partition. This enables fine-grained management after device removal, preventing the occupation of system resources by related connections, drivers, or partitions that remain active after device removal, thus reducing the operational burden on the management controller. It also prevents risks such as data leakage and device conflicts caused by residual connections or configurations, ensuring the stability and security of the management controller system. At the same time, it reserves a clean operating environment for the subsequent connection of new devices, improving the overall system reliability and resource utilization efficiency.
[0057] After completing the targeted processing corresponding to the device type, the management controller performs the final step: unloading the drivers for the serial bus device controller and the high-speed serial bus master device controller interfaces. This is because the serial bus device controller driver corresponds to the management controller's working mode as a slave device (such as when connecting a computer), while the high-speed serial bus master device controller interface driver corresponds to the management controller's working mode as a master device (such as when connecting wireless components or removable storage devices). Regardless of the previous mode, neither driver needs to continue running after the device is removed. Unloading completely releases the kernel resources occupied by the drivers and restores the management controller's serial bus to its initial state, preparing for the next device insertion. In this way, by accurately unloading idle drivers, kernel resources are maximized for release, avoiding system performance loss caused by invalid occupation. At the same time, restoring the serial bus to its initial state eliminates interference from residual configurations of previous modes on subsequent device access, ensuring compatibility and stability when switching to new modes. This improves the robustness and operating efficiency of the management controller's serial bus function from both resource optimization and state reset perspectives.
[0058] 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.
[0059] Embodiments of the present invention also provide a management controller bus adapter, wherein the management controller is connected to an interface chip via a serial bus; and the interface chip is connected to a target device via a serial bus. Figure 4 This is a schematic diagram of the management controller bus adapter device provided in an embodiment of the present invention. This embodiment is based on the perspective of functional modules, such as… Figure 4 As shown, the device is used to manage the controller and may include:
[0060] The information reading module 10 is used to read the information of the interface chip and obtain the action data of the target device from the information of the interface chip; the action data is data related to the insertion action and the removal action.
[0061] The type identification module 11 is used to identify the type of the target device through the interface chip when the current action of the target device is determined to be an insertion action based on the acquired action data.
[0062] The first loading module 12 is used to load its own internally integrated serial bus device controller driver when the target device is identified as an access device, and configure itself as a slave device of the serial bus for access by the target device.
[0063] The second loading module 13 is used to load its own internally integrated host controller interface driver when the target device is identified as an accessed device, and configure itself as a master device of the serial bus to manage and access the target device.
[0064] In the management controller bus adapter provided in the embodiments of the present invention, the master and slave device roles can be flexibly configured by identifying the target device type to effectively realize the serial bus interface function. This not only allows users to access the management controller in scenarios without a network connection, but also serves as a reliable backup solution for connecting and debugging the management controller in case of network environment failure or abnormal network function of the management controller, avoiding management interruption due to network problems. It also supports the management controller to operate independently without a network, reducing the security risks brought by network access. At the same time, by accurately adapting the driver and role configuration of different target devices, it ensures the stability and interaction efficiency of the serial bus connection, providing a more flexible, secure and reliable guarantee for the access and management of the management controller.
[0065] Since the embodiments of the management controller bus adaptation device and the management controller bus adaptation method correspond to each other, the descriptions of the features in the embodiments corresponding to the management controller bus adaptation device can be found in the relevant descriptions of the embodiments corresponding to the management controller bus adaptation method, and will not be repeated here. Furthermore, it has the same beneficial effects as the management controller bus adaptation method mentioned above.
[0066] Furthermore, in a specific implementation, in the management controller bus adapter device provided in the embodiments of the present invention, the management controller integrates a serial bus functional component; the serial bus functional component may include a serial bus device controller and a high-speed serial bus master device controller interface. The first loading module 13 is specifically used to, when the target device is identified as an access device, determine that it switches to slave mode, loads the driver program of the serial bus device controller, initializes the serial bus functional component as a slave device of the serial bus, and sets the target device as the master device of the serial bus, using the serial bus device controller to cooperate with the target device to complete data transmission. The second loading module 14 is specifically used to, when the target device is identified as an accessed device, determine that it switches to master mode, loads the driver program of the high-speed serial bus master device controller interface, initializes the serial bus functional component as a master device of the serial bus, sets the target device as a slave device of the serial bus, and uses the high-speed serial bus master device controller interface to manage and access the target device.
[0067] Furthermore, in a specific implementation, the management controller bus adapter device provided in the embodiments of the present invention may further include: a mode setting module, used to set the drivers of the serial bus device controller and the high-speed serial bus master device controller interface to manual loading mode, so as to compile the drivers of the serial bus device controller and the high-speed serial bus master device controller interface into a serial bus device controller kernel module and a high-speed serial bus master device controller interface kernel module respectively through the kernel.
[0068] Furthermore, in a specific implementation, in the management controller bus adapter device provided in the embodiments of the present invention, the management controller can be connected to the interface chip via an integrated circuit bus. The information reading module 10 is specifically used to read information from the first register of the interface chip using the integrated circuit bus. The type identification module 12 is specifically used to read information about the target device from the second register of the interface chip using the integrated circuit bus, and to identify the type of the target device.
[0069] Furthermore, in a specific implementation, the management controller bus adapter device provided in the embodiments of the present invention may further include: a shutdown unloading control module, configured to, if the current action of the target device is a removal action, obtain the type of the target device based on the recorded data of the target device before removal; when the type of the target device is obtained as an access device, shut down the serial bus network card connection channel; when the type of the target device is obtained as an accessed device and the accessed device is a wireless device, unload the relevant driver of the wireless device; when the type of the target device is obtained as an accessed device and the accessed device is a removable storage device, unload the storage partition.
[0070] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described embodiments of the management controller bus adaptation method.
[0071] Embodiments of the present invention 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 embodiments of the management controller bus adaptation method when running.
[0072] 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.
[0073] Embodiments of the present invention 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 embodiments of the management controller bus adaptation method.
[0074] Embodiments of the present invention 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 management controller bus adaptation method embodiments.
[0075] 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 implementations should not be considered beyond the scope of this invention.
[0076] The above provides a detailed description of a management controller bus adaptation method and electronic device provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. A management controller bus adaptation method, characterized in that, The management controller connects to the interface chip via a serial bus; The interface chip is connected to the target device via a serial bus; The method is used to manage the controller, including: The information of the interface chip is read, and the action data of the target device is obtained from the information of the interface chip; the action data is data related to insertion and removal actions. Based on the acquired action data, when it is determined that the current action of the target device is an insertion action, the characteristic information of the target device is obtained through the interface chip. The characteristic information includes at least one or a combination of the target device's role characteristics, protocol behavior, and preset identifier in communication interaction. The type of the target device is identified based on the characteristic information. After identifying the type of the target device, differentiated driving loading and dynamic switching of master and slave roles are performed. When the target device is identified as an access device, the system loads its internally integrated serial bus device controller driver, configures itself as a slave device of the serial bus for access by the target device, configures the slave device of the serial bus as a serial bus network card, and sets a static Internet Protocol address for the serial bus network card so that the access device can load a new network card driver for the identified slave device of the serial bus and set the Internet Protocol address of the new network card to the same static Internet Protocol address as the serial bus network card. When the target device is identified as an accessed device, the system loads its integrated host controller interface driver and configures itself as the master device of the serial bus to manage and access the target device. When the accessed device is a wireless device, after configuring itself as the master device of the serial bus, the system calls the driver of the wireless device to initialize the wireless device, initializing it as a network interface card (NIC). An Internet Protocol (IP) address is set for the initialized NIC so that the accessing device can access the management controller wirelessly. When the accessed device is a removable storage device, after configuring itself as the master device of the serial bus, the system calls a mount command to bind the removable storage device. After binding, the removable storage device is identified as a block device, and a device node with a specified naming format is generated in the device file system. The device node serves as the interface for interaction between the management controller and the removable storage device. Data read and write operations are performed on the removable storage device using the device node. When the current action of the target device is determined to be a removal action, the type of the target device is obtained based on the recorded data of the target device before removal; when the type of the target device is obtained as an access device, the serial bus network card connection channel is closed; when the type of the target device is obtained as an accessed device and the accessed device is a wireless device, the relevant driver of the wireless device is uninstalled; when the type of the target device is obtained as an accessed device and the accessed device is a removable storage device, the storage partition is uninstalled.
2. The management controller bus adaptation method according to claim 1, characterized in that, The management controller integrates a serial bus functional component; the serial bus functional component includes a serial bus device controller and a high-speed serial bus master device controller interface. When the target device is identified as an access device, the system loads its internally integrated serial bus device controller driver and configures itself as a slave device on the serial bus for access by the target device. This includes: determining that the system is switching to slave mode, loading the driver program of the serial bus device controller, initializing the serial bus functional components as slave devices on the serial bus, setting the target device as the master device on the serial bus, and using the serial bus device controller to cooperate with the target device to complete data transmission. When the target device is identified as an accessed device, the system loads its internally integrated host controller interface driver and configures itself as a master device of the serial bus to manage and access the target device. This includes: determining that the system switches to master device mode, loading the driver program of the high-speed serial bus master device controller interface, initializing the serial bus functional components as a master device of the serial bus, treating the target device as a slave device of the serial bus, and managing and accessing the target device using the high-speed serial bus master device controller interface.
3. The management controller bus adaptation method according to claim 2, characterized in that, Before reading the information from the interface chip, the process also includes: The drivers for both the serial bus device controller and the high-speed serial bus master device controller interface are set to manual loading mode, so that the drivers for the serial bus device controller and the high-speed serial bus master device controller interface are compiled into a serial bus device controller kernel module and a high-speed serial bus master device controller interface kernel module respectively through the kernel.
4. The management controller bus adaptation method according to claim 3, characterized in that, Loading the driver program for the serial bus device controller and initializing the serial bus functional component as a slave device of the serial bus includes: loading the kernel module of the serial bus device controller, activating the hardware functions and protocol adaptation capabilities of the serial bus device controller through the kernel module of the serial bus device controller, and enabling the serial bus device controller to enter the slave device working state. Loading the driver program for the high-speed serial bus master device controller interface and initializing the serial bus functional component as a serial bus master device includes: loading the kernel module of the high-speed serial bus master device controller interface, activating the hardware functions and protocol adaptation capabilities of the high-speed serial bus master device controller interface through the kernel module, and enabling the high-speed serial bus master device controller interface to enter the master device working state.
5. The management controller bus adaptation method according to claim 1, characterized in that, The management controller is connected to the interface chip via an integrated circuit bus; Reading information from the interface chip includes: Use the integrated circuit bus to read information from the first register of the interface chip; Identifying the type of the target device through the interface chip includes: The type of the target device is identified by reading information from the second register of the interface chip using the integrated circuit bus.
6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the management controller bus adaptation method as described in any one of claims 1 to 5 when executing the computer program.
Citation Information
Patent Citations
Hard disk hot plug method and device, terminal equipment and medium
CN113535246A
Apparatus and method for controlling USB deviceinterface in personal digital assistant
KR1020050029454A