Dynamic expansion control method and device of mainboard interface device and storage medium
By starting in a single-channel communication mode on the Intel platform motherboard, detecting external devices and switching to dual-channel communication mode, the problem that the motherboard cannot dynamically adjust the communication mode is solved, ensuring the system is stable and improving data transmission efficiency.
Patent Information
- Application Number
- CN202510765365.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-10
AI Technical Summary
The number of devices supported by the ESPI interface of the Intel platform motherboard is solidified in the firmware and cannot be dynamically modified, resulting in the inability to dynamically adjust according to the access status of the external device during operation, making it difficult to adapt to the uncertain number of external devices.
By starting in a single-channel communication mode, detecting external devices, using the soft jumper area rewriting function in the flash memory of the basic input and output system to switch to dual-channel communication mode, and restarting the motherboard to complete the communication handshake with the onboard and external devices, loading the dual-channel communication driver to realize dual-device boot.
It realizes stable booting of the motherboard under dynamic expansion, avoids booting failures caused by mismatch in communication modes or device conflicts, and improves the system's adaptability to different device configurations and data transmission efficiency.
Smart Images

Figure CN120277016A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic digital data processing, and particularly to a dynamic expansion control method, device, and storage medium for motherboard interface devices. Background Art
[0002] In the current motherboard design of the Intel platform, the number of devices supported by the ESPI (Enhanced Serial Peripheral Interface) interface is set in the motherboard firmware. After the motherboard firmware is burned, the configuration parameters of the ESPI are solidified, and the number of supported devices cannot be dynamically modified. Moreover, the startup of the motherboard depends on the ESPI handshake. It must complete the communication handshake with the set number of devices and confirm that the firmware is loaded before it can continue with the startup operation. There are deficiencies in dealing with dynamic expansion requirements and it is unable to dynamically adjust according to the connection status of external devices during operation, making it difficult to adapt to the situation where the number of external devices is uncertain.
[0003] The above content is only used to assist in understanding the technical solution of the present application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of the present application is to provide a dynamic expansion control method, device, and storage medium for motherboard interface devices, aiming to solve the technical problem of how to dynamically adjust the communication mode of the motherboard to adapt to changes in external devices.
[0005] To achieve the above purpose, the present application proposes a dynamic expansion control method for motherboard interface devices. The dynamic expansion control method for motherboard interface devices includes: In response to the motherboard startup operation, control the motherboard to start with a single-channel communication mode as the initial mode and complete the handshake communication with the on-board devices fixed on the motherboard; Detect all communication interfaces on the motherboard through predefined general-purpose input / output pins to determine whether there are external devices; If an external device is detected on the communication interface, switch from the single-channel communication mode to a dual-channel communication mode through the soft jumper area rewriting function in the basic input / output system flash memory, and trigger the motherboard to power down to a preset state; Control the motherboard to restart with the dual-channel communication mode, complete the communication handshake with the on-board devices and the external devices in sequence, and load the dual-channel communication driver to achieve dual-device startup.
[0006] In one embodiment, the step of "in response to the motherboard startup operation, control the motherboard to start with a single-channel communication mode as the initial mode and complete the handshake communication with the on-board devices fixed on the motherboard" includes: In response to the power-on operation of the main board, load a pre-configured single-channel communication driver from the basic input / output system; Based on the single-channel communication driver, initialize the registers and interrupt settings of the communication interface, and control the main board to start in the single-channel communication mode; In the single-channel communication mode, send a handshake request signal to the on-board device through the communication interface, and receive the response signal of the on-board device to complete the handshake communication.
[0007] In one embodiment, the step of detecting all communication interfaces on the main board through pre-defined general-purpose input / output pins to determine whether there is an external device includes: Judge whether there is an external device on the communication interface by reading the pin voltage of the general-purpose input / output pin; If the pin voltage jumps from a low level state to a high level state, it is determined that there is an external device; If the level state of the pin voltage remains unchanged, it is determined that there is no external device.
[0008] In one embodiment, the step of detecting all communication interfaces on the main board through pre-defined general-purpose input / output pins to determine whether there is an external device further includes: If an external device is detected on the communication interface, send a handshake signal to the communication interface through the general-purpose input / output pin; Receive and parse the response signal returned by the external device to obtain the characteristics of the response signal; Judge the characteristics of the response signal according to the handshake success conditions specified by the ESPI protocol specification to determine whether the external device is an ESPI device; If the characteristics of the response signal meet the handshake success conditions, it is determined that the handshake with the external device is successful, that is, the external device is an ESPI device.
[0009] In one embodiment, the step of, if an external device is detected on the communication interface, switching from the single-channel communication mode to the dual-channel communication mode through the soft jumper area rewrite function in the basic input / output system flash memory and triggering the main board to power down to a preset state includes: Through the flash memory management function of the basic input / output system, access the soft jumper area, and read and verify the soft jumper area to ensure that the soft jumper area is in a writable state; Generate configuration information for switching the communication mode from the single-channel communication mode to the dual-channel communication mode, and write it into the soft jumper area; Send a deep sleep power-off instruction to the motherboard through register operations of the embedded controller or the south bridge chip to trigger the motherboard to power off to a preset state.
[0010] In one embodiment, the steps of controlling the motherboard to restart in the dual-channel communication mode, sequentially completing communication handshakes with the on-board devices and the external devices, and loading the dual-channel communication driver to achieve dual-device startup include: Send a restart instruction to the power control unit of the motherboard through the embedded controller to control the motherboard to restart in the dual-channel communication mode; Based on the dual-channel communication mode, sequentially complete communication handshakes with the on-board devices and the external devices in a predefined order; Load the dual-channel communication driver program in the basic input / output system to allocate independent communication channels and interrupt resources for the on-board devices and the external devices; Synchronously process the data transmission requests of the on-board devices and the external devices through a polling mechanism or an event trigger mechanism to achieve dual-device startup.
[0011] In one embodiment, after the steps of controlling the motherboard to restart in the dual-channel communication mode, sequentially completing communication handshakes with the on-board devices and the external devices, and loading the dual-channel communication driver to achieve dual-device startup, it includes: Monitor the real-time load conditions of the on-board devices and the external devices; Dynamically adjust the communication bandwidth allocated to the on-board devices and the external devices according to the real-time load conditions; Manage the access requests of the on-board devices and the external devices to the communication channels through the hardware interrupt controller, and determine the access rights of the communication channels according to the device priority rules.
[0012] In one embodiment, the dynamic expansion control method of the motherboard interface device further includes: If a hot plug event is detected, send a control signal to the corresponding communication interface to freeze the current communication link of the communication interface to prevent data loss or damage; Allocate an independent buffer for the new device connected to the communication interface, and dynamically update the corresponding driver program based on the type of the new device; Switch the single-channel communication mode to the dual-channel communication mode. If the communication mode switch fails, trigger a rollback mechanism to restore to the single-channel communication mode, and notify the user end of the reason for the failure of the mode switch.
[0013] In addition, to achieve the above object, the present application further provides a dynamic expansion control device for a motherboard interface device, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the dynamic expansion control method for the motherboard interface device as described above.
[0014] In addition, to achieve the above object, the present application further provides a storage medium, the storage medium being a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the dynamic expansion control method for the motherboard interface device as described above.
[0015] The present application provides a dynamic expansion control method for a motherboard interface device. The present application controls the motherboard to start in a single-channel communication mode as the initial mode in response to the motherboard power-on operation, and completes the handshake communication with the on-board device, where the on-board device is fixedly installed on the motherboard; detects all communication interfaces on the motherboard through predefined general-purpose input / output pins to determine whether there is an external device; if an external device is detected on the communication interface, switches from the single-channel communication mode to the dual-channel communication mode through the soft jumper area rewriting function in the basic input / output system flash memory, and triggers the motherboard to power down to a preset state; controls the motherboard to restart in the dual-channel communication mode, completes the communication handshake with the on-board device and the external device in sequence, and loads the dual-channel communication driver to realize the startup of the dual devices. The present application first simplifies the communication configuration and management during startup by starting in a single-channel communication mode, ensures that the system can complete the startup process quickly and stably, and avoids startup failures or system instabilities caused by mismatched communication modes or device conflicts. By detecting the connection status of external devices on the communication interface in real time, it decides whether to switch the communication mode, improving the adaptability of the system to different device configurations. The dynamic adjustment of the communication mode is realized through the soft jumper area rewriting function, improving the flexibility of the control system. By loading the dual-channel communication driver, the motherboard can support the collaborative work of the on-board device and the external device simultaneously, improving the data transmission efficiency. The present application achieves the technical effect of dynamically adjusting the communication mode of the motherboard to adapt to changes in external devices. Description of the Drawings
[0016] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0017] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 A schematic flowchart provided for the first embodiment of the dynamic expansion control method of the motherboard interface device of this application; Figure 2 A schematic flowchart provided for the second embodiment of the dynamic expansion control method of the motherboard interface device of this application; Figure 3 A schematic flowchart provided for the third embodiment of the dynamic expansion control method of the motherboard interface device of this application; Figure 4 A schematic flowchart provided for the fourth embodiment of the dynamic expansion control method of the motherboard interface device of this application; Figure 5 A schematic flowchart provided for the dynamic expansion control method of the motherboard interface device of this application; Figure 6 A schematic diagram of the device structure of the hardware operating environment involved in the dynamic expansion control method of the motherboard interface device in the embodiment of this application.
[0019] The realization of the purpose, functional characteristics and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Specific implementation manners
[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0021] In order to better understand the technical solutions of this application, the following will be described in detail in combination with the accompanying drawings of the specification and specific implementation manners.
[0022] The main solution of the embodiment of this application is: Currently, in the motherboard design of the Intel platform, the number of devices supported by the ESPI (Enhanced Serial Peripheral Interface) interface is set in the motherboard firmware. After the motherboard firmware is burned, the configuration parameters of the ESPI will be solidified, and the number of supported devices cannot be dynamically modified. Moreover, the startup of the motherboard depends on the ESPI handshake. It must complete the communication handshake with the set number of devices and confirm that the firmware is loaded before continuing the startup operation. There are deficiencies in coping with dynamic expansion requirements and it is impossible to dynamically adjust according to the connection status of external devices during operation, making it difficult to adapt to the situation where the number of external devices is uncertain.
[0023] This application starts in a single - channel communication mode, simplifying the communication configuration and management during startup, ensuring that the system can complete the startup process quickly and stably, and avoiding startup failures or system instability caused by mismatched communication modes or device conflicts. By detecting the connection status of external devices on the communication interface in real - time, it decides whether to switch the communication mode, improving the system's adaptability to different device configurations. The dynamic adjustment of the communication mode is achieved through the soft jumper area rewriting function, enhancing the flexibility of the control system. By loading the dual - channel communication driver, the motherboard can support the coordinated work of on - board devices and external devices simultaneously, adapt to changes in external devices, and improve data transmission efficiency.
[0024] It should be noted that the execution entity of this embodiment can be a dynamic expansion control system for motherboard interface devices, or a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a control device of a dynamic expansion control system for motherboard interface devices that can implement the above functions. This embodiment does not make specific limitations in this regard. Hereinafter, taking the dynamic expansion control system for motherboard interface devices as the execution entity as an example, this embodiment and the following embodiments will be described.
[0025] Embodiment 1 Based on this, the present application proposes a dynamic expansion control method for motherboard interface devices in the first embodiment. Please refer to Figure 1 , the dynamic expansion control method for the motherboard interface device includes: Step S10, in response to the motherboard startup operation, control the motherboard to start with a single - channel communication mode as the initial mode, and complete the handshake communication with the on - board devices, where the on - board devices are fixedly installed on the motherboard.
[0026] By using the single - channel communication mode as the initial startup mode, the communication configuration during startup is simplified, avoiding startup failures caused by multi - device communication conflicts or complex configurations, and ensuring that the motherboard can successfully establish a reliable communication connection with the on - board devices.
[0027] In this embodiment, the mainboard power-on operation is the power-on operation of the mainboard triggered by the user. By pressing the power button on the computer host, a start command is sent to the mainboard, causing the mainboard to enter the power-on startup process from the shutdown state. The mainboard is the core component in the computer system and is the hub connecting all the hardware components of the computer. It is responsible for coordinating the work among various components, transmitting data and instructions. The single-channel communication mode means that the mainboard only uses one communication channel to communicate with the on-board devices during the initial startup phase. Compared with the multi-channel communication mode, the single-channel communication mode has a relatively simple structure and communication logic, which can reduce the probability of errors or conflicts during communication and ensure the stability of communication. The on-board devices are the hardware devices directly integrated on the mainboard. There is an on-board device fixedly installed on the mainboard, which communicates and exchanges data with the mainboard through the ESPI communication interface of the mainboard. The ESPI communication interface is a computer hardware interface used to provide a communication connection between the central processing unit (CPU) on the mainboard and other hardware devices. Handshake communication is a communication protocol or process used to establish a reliable communication connection between the mainboard and the on-board devices. During the handshake process, the two devices will exchange signals or data packets according to the predefined rules and order to confirm each other's existence, the consistency of communication parameters, and the availability of the communication channel.
[0028] As an alternative implementation, upon receiving the power-on signal when the user presses the power button, the power management module of the mainboard is triggered to start working. The power management module sends a start signal to the power control chip on the mainboard. After receiving the start signal, the power control chip starts to supply power to each hardware component on the mainboard. The basic input / output system or Unified Extensible Firmware Interface on the mainboard starts running after receiving the power-on signal. By setting the register parameters of the ESPI communication interface, the ESPI communication interface is configured into the single-channel communication mode. A handshake request signal is sent to the on-board device through the predefined ESPI communication interface. According to the response signal returned by the on-board device after receiving the handshake request, working parameters such as the communication rate, buffer size, and interrupt priority of the on-board device are configured, and the establishment of the communication link is completed, entering the power-on state.
[0029] Optionally, for a mainboard that supports the remote wake-up function, based on the network interface chip, it receives the wake-up instruction sent by the user through the network and passes it to the power management chip of the mainboard. The power management chip parses and verifies the instruction. After confirming that there is no error, it starts the power-on initialization process of the mainboard to achieve remote power-on.
[0030] Optionally, if the mainboard does not receive the response signal from the on-board device within the specified timeout period after sending the handshake request signal, it automatically resends the handshake request signal. If the number of retries reaches the predetermined number but still fails to complete the handshake communication, an error message is reported to prompt the user that there may be a hardware failure.
[0031] Optionally, step S10 includes: Step S11, in response to the main board power-on operation, load a pre-configured single-channel communication driver from the basic input / output system.
[0032] Loading a pre-configured single-channel communication driver from the basic input / output system provides necessary software support for subsequent initialization of the communication interface and start of the single-channel communication mode based on this driver.
[0033] It should be noted that the basic input / output system (BIOS, Basic Input / Output System) is a program stored in a read-only memory chip on the computer main board, which stores the most important basic input / output programs, system setting information, power-on self-test program and system self-start program of the computer. Its main function is to provide the most basic and direct hardware settings and controls for the computer, run first when the computer starts, and is responsible for initializing hardware devices, detecting system configurations and other operations. The single-channel communication driver is a driver containing initialization code stored in the main board.
[0034] Optionally, after compiling the pre-written single-channel communication driver code, store it in a specific storage area of the basic input / output system chip of the main board. When the main board responds to the power-on operation, the basic input / output system will execute each internal stored program module in accordance with the preset startup process. When executing the communication initialization-related module, the basic input / output system will locate the address area storing the single-channel communication driver and load the driver code into the memory.
[0035] As an alternative implementation, select a suitable single-channel communication driver from the stored driver list for loading according to the hardware configuration of the main board and the startup mode of the single-channel communication mode.
[0036] Optionally, during the loading process, the basic input / output system will perform an integrity check on the driver to ensure that the code is not damaged or incorrect.
[0037] Step S12, based on the single-channel communication driver, initialize the registers and interrupt settings of the communication interface, and control the main board to start in the single-channel communication mode.
[0038] Based on the loaded single-channel communication driver, initialize the settings of the registers and interrupts of the communication interface, so that the communication interface can work properly according to the requirements of the single-channel communication mode, thereby controlling the main board to start in the single-channel communication mode and making hardware preparations for subsequent communication with on-board devices.
[0039] It should be noted that the communication interface is an ESPI communication interface, which is used on the main board to implement the physics and logic of data transmission between the main board and on-board devices, including the hardware circuit and the communication protocol defined by software. The register is a fast storage unit inside the central processing unit or other chips for storing data and instructions, and the register is used to store communication-related configuration information, status information, and control commands. The interrupt is a hardware mechanism. When events such as receiving data and sending completion occur in the ESPI communication interface, an interrupt request signal is sent to the central processing unit to notify the central processing unit to pause the currently executing program and instead execute the corresponding interrupt handler. The interrupt settings include setting the interrupt trigger mode, interrupt priority, interrupt vector table, etc., to ensure that the central processing unit responds to the interrupt request of the ESPI communication interface in a timely and accurate manner.
[0040] As an alternative implementation, through the single-channel communication driver, according to the requirements of the single-channel communication mode, corresponding functions or instructions are provided, and the central processing unit calls the functions or instructions to perform read and write operations on each register of the ESPI communication interface to initialize the configuration. The single-channel communication driver sets the interrupt trigger condition and the interrupt handler according to the functions and requirements of the communication interface.
[0041] Exemplarily, according to the functions or instructions provided by the single-channel communication driver, the central processing unit performs read and write operations on each register of the communication interface, sets the communication mode register to the single-channel communication mode, configures the communication rate register to the set transmission rate, and sets the data bit width register to the set bit width. The single-channel communication driver registers the corresponding interrupt handler address in the interrupt vector table. When the communication interface receives data sent by the on-board device, a receive interrupt is triggered, and the central processing unit jumps to the corresponding interrupt handler for execution according to the interrupt vector table to process the received data through the interrupt handler. Processing the received data includes verifying the integrity of the data and storing the data in a specified memory area, etc.
[0042] Step S13, in the single-channel communication mode, send a handshake request signal to the on-board device through the communication interface and receive the response signal of the on-board device to complete the handshake communication.
[0043] In the single-channel communication mode, handshake communication is performed with the on-board device through the initialized ESPI communication interface to confirm the existence and normal communication of both devices, so as to enter the power-on state and prepare for the further startup and operation of the system.
[0044] It should be noted that the handshake request signal is a signal sent by the main board to the on-board device to initiate the handshake communication process. The handshake request signal contains information such as the device information and communication parameters of the main board. The response signal is a signal returned by the on-board device according to its own status and configuration after receiving the handshake request signal, and contains relevant information such as the device type of the on-board device and the supported communication parameters. By receiving and analyzing the response signal, the main board can confirm the presence and communication status of the on-board device.
[0045] As an optional implementation manner, after the initialization of the ESPI communication interface is completed, the single-channel communication driver controls the ESPI communication interface to send the handshake request signal to the on-board device according to the predefined communication protocol and format. By continuously monitoring the signals on the bus through the ESPI communication interface, when the response signal sent by the on-board device is detected, the single-channel communication driver parses the response signal according to the communication protocol, extracts the key information in the response signal, and compares and verifies it with the pre-stored information. If the verification passes, the handshake communication between the main board and the on-board device is successfully completed. Among them, the bus is a common communication trunk for transmitting information between various functional components on the main board and is a data channel connecting components such as the central processing unit, memory, cache, and external control chips.
[0046] Step S20, detecting all communication interfaces on the main board through predefined general-purpose input / output pins to determine whether there is an external device.
[0047] When the main board is in the powered-on state, detect the connection status of external devices on all communication interfaces of the main board, understand the connection situation between the main board and external devices in real time, and determine whether there is an external device, so as to provide a basis for subsequent communication mode switching and device management.
[0048] In this embodiment, the general-purpose input / output pin (GPIO, General Purpose Input / Output) is a flexible and configurable pin on the main board, which can be set to input or output mode according to system requirements. When used as an input pin, it can detect the high and low level status of external signals; when used as an output pin, it can send control signals to external devices. The communication interfaces on the main board include the carrier board ESPI interface and the main board M.2 slot. The carrier board ESPI interface is an interface designed for customized devices developed by third parties, supports flexible expansion, and the interface design is non-standardized. Different carrier board ESPI interfaces can carry different functions and different specifications of ESPI devices; the main board M.2 slot is a standardized high-speed expansion interface for connecting ESPI peripheral cards with M.2 interfaces.
[0049] As an alternative implementation, by setting the general-purpose input / output pin register, configure the predefined general-purpose input / output pins to the input mode to read the electrical signals of all the ESPI communication interfaces on the main board. Periodically poll and detect the level status of the general-purpose input / output pins, read the values of all the general-purpose input / output pins used to detect the connection status of external devices, and store the read values in the memory. Compare the current level value of the general-purpose input / output pin read with the value read last time in the memory to determine whether there is a change in the level. If the level of the general-purpose input / output pin corresponding to the ESPI communication interface changes, it is determined that an external device is inserted into the ESPI communication interface.
[0050] As an alternative implementation for detecting communication interfaces, traverse and detect all the ESPI communication interfaces, and sequentially read the level status of the general-purpose input / output pins corresponding to each ESPI communication interface in a preset order. After detecting each pin, record whether there is an external device connected to the ESPI communication interface corresponding to that pin.
[0051] As an alternative implementation for detecting communication interfaces, perform a full-scale detection of all the ESPI communication interfaces, simultaneously read the level status of all the general-purpose input / output pins used to detect external devices of the ESPI communication interfaces, and make a unified judgment on the read level status to determine whether there is an external device connected to each ESPI communication interface.
[0052] Exemplarily, connect the general-purpose input / output pin to the power pin of the M.2 slot on the main board, configure the general-purpose input / output pin to the input mode through the basic input / output system, and enable the internal pull-up resistor. Periodically read the level status of the general-purpose input / output pin to determine whether there is an external device connected to the M.2 slot.
[0053] Optionally, due to reasons such as mechanical contact, the level of the general-purpose input / output pin may jitter when the device is inserted or removed. Use an RC filter circuit for hardware debouncing; at the same time, perform software debouncing by continuously detecting the level status multiple times. If the multiple detection results are consistent, the level is considered stable.
[0054] Optionally, step S20 includes: Step S21, by reading the pin voltage of the general-purpose input / output pin, determine whether there is the external device on the communication interface.
[0055] It should be noted that the pin voltage is the potential difference carried on the general-purpose input / output pin. By measuring the pin voltage, the state of the external circuit connected to the pin can be judged, and further determine whether there is an external device on the communication interface.
[0056] As an alternative implementation, configure the general-purpose input / output pins as input mode, and periodically poll and read the analog voltage value of the pins through the microcontroller, convert it into a digital signal, and compare it with the historically recorded level state to determine whether there is an external device on the communication interface.
[0057] Optionally, record the voltage value of the pins read each time, and save the level state of the current pins for subsequent comparison with the historical record to determine whether the level state has changed.
[0058] Step S22, if the pin voltage jumps from a low level state to a high level state, it is determined that there is the external device.
[0059] Exemplarily, according to the preset high and low level thresholds, convert the currently read pin voltage value into a level state, and compare it with the historical level state. If the current level state is high level and the historical level state is low level, it indicates that the pin voltage has jumped from a low level state to a high level state. According to the hardware design specification, when the general-purpose input / output pin voltage jumps from low level to high level, it means that there is an external device inserted into the corresponding communication interface, and it is determined that there is an external device on the communication interface corresponding to the input / output pin.
[0060] Optionally, in the hardware design specification of the main board, when the communication interface is not connected to an external device, the voltage of the corresponding general-purpose input / output pin is high level. At this time, when the general-purpose input / output pin voltage jumps from high level to low level, it means that there is an external device inserted into the corresponding communication interface, and it is determined that there is an external device on the communication interface corresponding to the input / output pin.
[0061] Step S23, if the level state of the pin voltage remains unchanged, it is determined that there is no such external device.
[0062] Exemplarily, convert the currently read pin voltage value into a level state, and compare it with the level state recorded last time. If the two level states are the same, that is, the level state of the pin voltage has not changed, it is determined that there is no external device on this communication interface.
[0063] Step S30, if it is detected that there is an external device on the communication interface, switch from the single-channel communication mode to the dual-channel communication mode through the soft jumper area rewriting function in the basic input / output system flash memory, and trigger the main board to power down to a preset state.
[0064] When an external device is detected connected to the communication interface, dynamically adjust the communication mode of the motherboard to adapt to the new device configuration requirements. By switching from the single-channel communication mode to the dual-channel communication mode and triggering a power-off restart of the motherboard, ensure that the system can operate stably in the new communication mode, while avoiding problems such as abnormal device operation or system instability caused by mismatched communication modes.
[0065] In this embodiment, the Basic Input / Output System Flash is a flash memory chip that stores the Basic Input / Output System program and has an erasable and writable feature, allowing users or the system to update and modify the Basic Input / Output System program. The soft jumper area is a specific area divided in the Basic Input / Output System Flash for storing parameters that can be configured and modified through software. By modifying the content of the soft jumper area, the hardware configuration of the motherboard can be dynamically adjusted without changing physical jumpers. The rewrite function is the ability to modify the content of the soft jumper area through software operations. The dual-channel communication mode is a mode that uses two independent communication channels to simultaneously transmit data. The two channels can transmit different data in parallel, thereby improving the data transmission rate and supporting the collaborative work of more devices. The preset states include the power-off state or the low-power state. The power-off state is a power-free state entered after the motherboard completely cuts off the power supply and all hardware components stop working, that is, the G3 state in the Advanced Configuration and Power Interface (ACPI). At this time, the motherboard is completely turned off, and except for the real-time clock powered by the internal battery, all other hardware is powered off, which is a state of completely cutting off the power supply mechanically. The low-power state is a state where the motherboard enters the low-power sleep mode and some hardware remains powered to maintain basic functions, including the S3 state in the power management specification. At this time, the motherboard saves the system state to the memory, turns off the power supply of most hardware devices, and only keeps the memory powered; and the S4 state in the power management specification. At this time, the motherboard saves the system state to the disk and turns off the power supply of all hardware devices, including the memory; and other low-power states specified in the power management specification.
[0066] As an alternative implementation, after detecting the existence of an external device, the Basic Input / Output System accesses the corresponding Basic Input / Output System Flash, writes the corresponding code according to the soft jumper parameters for switching the communication mode, writes a new parameter value to the soft jumper area of the Basic Input / Output System Flash chip, and switches from the single-channel communication mode to the dual-channel communication mode. After completing the communication mode switch, the Basic Input / Output System triggers the motherboard to enter the completely powered-off G3 state by sending a power-off instruction to the power management controller of the motherboard.
[0067] As another optional implementation method for entering a preset state, after completing the communication mode switching, it is determined that the motherboard needs to enter a low power state. If it is determined that the motherboard enters the S3 state, the basic input and output system triggers the motherboard to enter the low power S3 state by sending an S3 instruction to the power management controller of the motherboard.
[0068] Optionally, the dual-channel communication mode of the present application is switched when only one external device is connected, but if the motherboard detects multiple external devices, it can switch to a multi-channel communication mode with a number of communication channels corresponding to the number of external devices. The switching method is the same as the dual-channel communication mode switching method.
[0069] Optionally, step S30 includes: Step S31, accessing the soft jumper area through the flash memory management function of the basic input and output system, and reading and verifying the soft jumper area to ensure that the soft jumper area is in a writable state.
[0070] Before modifying the soft jumper area, ensure that the area is in a writable state to avoid configuration information writing failure due to the area not being writable, and ensure the smooth switching of subsequent communication modes.
[0071] Exemplarily, a read command is sent to the flash memory chip through the basic input and output system to obtain the current status information of the soft jumper area, including the write protection flag, etc. If the write protection flag is 0, the write protection state is not activated, and the area is determined to be in a writable state. If the write protection flag is 1, it is in a write protection state, and a write protection release command is sent, and the state verification is performed after the write protection is released.
[0072] Step S32, generating configuration information for switching the communication mode from the single-channel communication mode to the dual-channel communication mode, and writing the configuration information into the soft jumper area.
[0073] The configuration information for switching the communication mode from single-channel to dual-channel is accurately written into the soft jumper area, so that the mainboard can perform hardware initialization according to the new communication mode at the next startup to realize the switching of the communication mode.
[0074] It should be noted that configuration information refers to a set of data used to define the working status and parameters of the motherboard hardware, including all parameters and settings required to switch the communication mode from single-channel to dual-channel, such as register configuration, interrupt allocation, memory mapping, etc. of the communication interface.
[0075] Optionally, according to the motherboard hardware design document and the communication interface specification, the configuration information required to switch the communication mode from single-channel to dual-channel is determined, and according to the program written in the programming language, a corresponding data structure is generated according to the determined configuration information content. The code for writing the configuration information is integrated into the basic input and output system.
[0076] Exemplarily, when it is detected that a communication mode switch is required, access the soft jumper area through the basic input / output system, execute the code for writing configuration information, and write the configuration information into the soft jumper area through the hardware interface.
[0077] Step S33: Send a deep sleep power-off instruction to the motherboard through register operations of the embedded controller or the south bridge chip to trigger the motherboard to power down to a preset state.
[0078] By sending a deep sleep power-off instruction, the motherboard is powered down to a preset state so that it can start in the new communication mode after power-on again, ensuring that the communication mode switch takes effect and avoiding hardware conflicts or data loss caused by switching while powered on.
[0079] It should be noted that the embedded controller is an independent microcontroller on the motherboard, responsible for managing low-speed devices such as power supplies and communicating with the basic input / output system to implement power management functions. The south bridge chip is an important part of the motherboard chipset, responsible for hardware functions such as power management and is a key component for data interaction and control between the motherboard and external devices. A register is a storage unit inside the chip used to store control information and status information. The deep sleep power-off instruction is a power management instruction used to instruct the motherboard to enter the G3 state and cut off the power. The deep sleep power-off instruction ensures that all hardware components of the motherboard completely stop working and saves the system state to non-volatile memory so that it can be restored to the previous state when restarted.
[0080] As an alternative implementation, based on the data manual of the embedded controller, determine the relevant register addresses for controlling the motherboard power management and the instruction value for triggering deep sleep power-off. The basic input / output system communicates with the embedded controller and writes the deep sleep power-off instruction value to the target register address, thereby powering down the motherboard to a preset state.
[0081] As another alternative implementation, obtain the register addresses and the deep sleep power-off instruction value of the south bridge chip for controlling the motherboard power state. A power management specification table is written in the basic input / output system, which defines the method for triggering deep sleep power-off by operating the registers of the south bridge chip. The operating system loads the power management specification table at startup and calls the corresponding method to implement the power management function. When it is necessary to trigger the motherboard to power off, call this method and write the deep sleep power-off instruction value to the specified register of the south bridge chip through the hardware abstraction layer interface provided by the power management specification, thereby powering down the motherboard to a preset state.
[0082] Optionally, after switching from the single-channel communication mode to the dual-channel communication mode, the motherboard can also be controlled by the embedded controller or the edge baseboard management controller to enter the low-power G3 state.
[0083] Step S40: Control the main board to restart in the dual - communication mode, complete communication handshakes with the on - board devices and the external devices in sequence, and load the dual - communication driver to achieve power - on of the dual devices.
[0084] Enable the main board to complete the startup process according to the newly configured dual - communication mode, establish a stable and efficient communication connection with the on - board devices and the external devices, and load the driver program adapted to the dual - communication to realize the collaborative work of the on - board devices and the external devices in the dual - communication mode, give full play to the performance advantages of the dual - communication mode, improve the data transmission efficiency and system performance, so as to meet the requirements of efficient cooperation between devices in complex application scenarios.
[0085] In this embodiment, the dual - communication driver is a software program designed for the dual - communication mode, which is used to manage and control the data transmission between the main board and the on - board devices and the external devices in the dual - communication mode.
[0086] As an alternative implementation, immediately power on the main board after it is powered off, and supply power to each hardware component on the main board through the power management module. The basic input - output system reads the configuration information in the soft jumper area, initializes the registers and interrupt settings of the communication interface according to the configuration information of the dual - communication mode to ensure that the communication interface can support the dual - communication. Enumerate the on - board devices and the external devices, identify the type, model, unique identifier of each device and the connected communication interface, and perform communication handshakes with the on - board devices and the external devices in sequence according to the predefined order. After the device communication handshakes are completed, automatically search for and load the corresponding dual - communication driver program from the driver library according to the hardware ID and device type of the device. Manage the data transmission between the main board and the on - board devices and the external devices through the dual - communication driver program to achieve power - on of the dual devices.
[0087] Optionally, during the handshake process, dynamically adjust the communication parameters to adapt to the characteristics of different devices, and automatically adjust the communication rate and buffer size according to the response time and data transmission ability of the devices.
[0088] Optionally, step S40 includes: Step S41: Send a restart instruction to the power control unit of the main board through the embedded controller to control the main board to restart in the dual - communication mode.
[0089] Send a restart instruction to the power control unit of the main board through the embedded controller to make the main board restart in the dual - communication mode, ensure that the system can operate normally according to the new communication mode, complete the restart preparation after the system configuration is changed, and enable the system to power on in the dual - communication mode after restart.
[0090] It should be noted that the power control unit is a component on the main board responsible for managing the power distribution and control of the entire main board.
[0091] Exemplarily, a restart instruction is sent to the power control unit through the embedded controller. After receiving the restart instruction sent by the embedded controller, the power control unit restarts the main board according to the predetermined power-on sequence, supplies power to each component on the main board in turn, and monitors the power-on status of each component to ensure normal startup. After the main board power is restarted, initialization configuration is performed according to the switched dual-channel communication mode.
[0092] Step S42: Based on the dual-channel communication mode, complete communication handshakes with the on-board devices and the external devices in a predefined order.
[0093] It should be noted that the predefined order refers to the sequence of communication handshakes with devices determined according to factors such as device type, importance, and connection location during system design.
[0094] Optionally, according to the hardware design document and device priorities, define the order of communication handshakes with on-board devices and external devices. Arrange the handshake order of on-board devices before that of external devices.
[0095] Exemplarily, after starting in the dual-channel communication mode, handshake request signals are sent to the on-board devices and the external devices in a predefined order, and the identity and communication capabilities of the devices are verified according to the response signals of the on-board devices and the external devices, and the handshake is completed to enter the normal communication state.
[0096] Step S43: Load the dual-channel communication driver in the basic input / output system, and allocate independent communication channels and interrupt resources for the on-board devices and the external devices.
[0097] It should be noted that the interrupt resource is a mechanism for notifying the central processing unit that there is an external event to be processed. An independent interrupt request line is allocated for each device. When the device generates an event, an interrupt signal is sent to the central processing unit through this interrupt request line, and the central processing unit responds to the interrupt and executes the corresponding interrupt handling program.
[0098] Exemplarily, according to the device information of the on-board devices and the external devices and the resource information of the basic input / output system, load the dual-channel communication driver. Based on the dual-channel communication driver, allocate independent communication channels for the on-board devices and the external devices according to the device type, communication requirements, and system resource conditions, and allocate independent interrupt resources for each device through the interrupt management interface.
[0099] Optionally, during the startup process of the basic input / output system, reserve communication channels and interrupt resources for the on-board devices and the external devices according to the hardware design information and predefined device configurations.
[0100] Step S44, synchronously process the data transfer requests of the on-board device and the external device through a polling mechanism or an event-triggering mechanism to achieve dual-device startup.
[0101] It should be noted that the polling mechanism checks whether there are data transfer requests from the on-board device and the external device at regular time intervals. If there is a request, it is processed immediately; if there is no request, the next device is checked, and so on in a loop. The event-triggering mechanism is that when the device has a data transfer request, it sends an event notification to the main board through an interrupt method, and the main board responds to the event notification and processes the data transfer request.
[0102] As an alternative implementation, under the polling mechanism, according to the preset polling period and order, check the data transfer requests of the on-board device and the external device in turn and process them. After the processing is completed, continue the next round of polling to achieve efficient collaborative work of the dual devices.
[0103] As another alternative implementation, under the event-triggering mechanism, when the on-board device and the external device have data transfer requests, they send interrupt signals to the central processing unit through the interrupt request line. After the central processing unit responds to the interrupt, it calls the corresponding interrupt handler to process the data transfer request. After the interrupt handler processes the data transfer request, it executes an interrupt return instruction to restore the central processing unit to the state before the interrupt and continue to execute the normal program flow to complete the startup process of the dual devices and achieve dual-device startup.
[0104] Optionally, different priorities are set for the data transfer requests of the on-board device and the external device according to the task importance and urgency of the devices. When processing the requests, schedule them in the order of priority to ensure that critical tasks can be processed in a timely manner.
[0105] This embodiment provides a method for dynamically expanding and controlling a main board interface device. This embodiment first starts in a single-channel communication mode, simplifies the communication configuration and management during startup, ensures that the system can complete the startup process quickly and stably, and avoids startup failures or system instabilities caused by mismatched communication modes or device conflicts. By detecting the connection status of external devices on the communication interface in real time, it decides whether to switch the communication mode, improving the adaptability of the system to different device configurations. The dynamic adjustment of the communication mode is achieved through the soft jumper area rewriting function, improving the flexibility of the control system. By loading the dual-channel communication driver, the main board can support the collaborative work of the on-board device and the external device at the same time, adapt to changes in external devices, and improve data transfer efficiency.
[0106] Based on Embodiment 1, Embodiment 2 of the present application proposes a method for dynamically expanding and controlling a main board interface device. Referring to Figure 2 , step S20 further includes: Step A10: If an external device is detected on the communication interface, send a handshake signal to the communication interface through the general-purpose input / output pins.
[0107] When an external device is detected on the ESPI communication interface, actively establish contact with the external device, obtain device information, and prepare for subsequent device identification and communication.
[0108] It should be noted that the handshake signal is generated based on the ESPI protocol specification and is a signal used for handshaking communication with ESPI devices. It is an electrical signal composed of a series of pulses with specific timings and level changes. By sending a handshake signal to the ESPI communication interface, an external ESPI device can be triggered to generate a response. The ESPI protocol specification stipulates rules for device communication formats, sequences, timings, etc., including signal characteristics and judgment conditions during the handshake process.
[0109] As an alternative implementation, when a device is detected to be connected, call the general-purpose input / output pin control function, configure the general-purpose input / output pins as the output mode, and set the output level. Send a handshake signal to the ESPI communication interface through the general-purpose input / output pins.
[0110] Step A20: Receive and parse the response signal returned by the external device to obtain the characteristics of the response signal.
[0111] Receiving and parsing the response signal can verify whether the communication link between the main board and the external device is successfully established, determine the characteristics of the response signal, and accurately identify the device type of the external device.
[0112] It should be noted that the characteristics of the response signal are representative characteristic information of the response signal, including signal timings, level changes, data encoding formats, etc., and are used to determine whether the device complies with the ESPI protocol.
[0113] As an alternative implementation, monitor the response signal in real time by polling the status of the general-purpose input / output pins. Parse the received response signal according to the ESPI communication protocol and the signal characteristic template to determine the characteristics of the response signal.
[0114] Step A30: Judge the characteristics of the response signal according to the handshake success conditions stipulated in the ESPI protocol specification to determine whether the external device is an ESPI device.
[0115] Confirm whether the external device complies with the ESPI protocol specification through the handshake process, ensure that the main board can effectively communicate with compatible ESPI devices, avoid system malfunctions or communication failures caused by connecting incompatible devices, and ensure the stable operation of the system and the accuracy of data transmission.
[0116] It should be noted that the handshake success conditions are specific conditions defined in the ESPI protocol, including signal level changes, timing requirements, data formats, etc. When the response signal returned by the external device meets these conditions, it indicates a successful handshake.
[0117] As an alternative implementation, the characteristics of the parsed response signal are compared one by one with the handshake success conditions specified in the ESPI protocol specification, including checking whether the starting level of the signal meets the requirements, whether the pulse timing matches, and whether the data encoding conforms to the format specified in the ESPI protocol.
[0118] Step A40, if the characteristics of the response signal meet the handshake success conditions, it is determined that the handshake with the external device is successful, that is, the external device is an ESPI device.
[0119] As an alternative implementation, if all comparison items of the handshake success conditions meet the handshake success conditions specified in the ESPI protocol, it is determined that the handshake with the external device is successful, that is, the external device is considered an ESPI device.
[0120] This embodiment provides a method for dynamically expanding and controlling a motherboard interface device. In this embodiment, by identifying the type of the external device, the compatibility is quickly judged when the device is connected, ensuring that communication is established only with compatible devices, avoiding system failures or performance degradation caused by device incompatibility, and improving the stability of the system.
[0121] Based on Embodiment 1, Embodiment 3 of the present application proposes a method for dynamically expanding and controlling a motherboard interface device. Referring to Figure 3 , after step S40, it includes: Step S50, monitor the real-time load conditions of the on-board device and the external device.
[0122] Understanding the load conditions of the on-board device and the external device in real time provides a basis for dynamically adjusting communication resources and ensuring the efficient operation of the system.
[0123] It should be noted that the real-time load conditions are indicators such as the data transfer rate, processor usage rate, and memory occupancy rate of the device during operation, reflecting the current working intensity of the device and the demand for communication resources.
[0124] As an alternative implementation, the operation data of the on-board device is directly collected through the performance counters built in the motherboard and the on-board device chip. By installing sensors at key parts of the on-board device, parameters such as temperature and power consumption are monitored, and the load conditions of the on-board device are comprehensively judged. The method for obtaining the load conditions of the external device is the same as that of the on-board device.
[0125] As another alternative implementation, based on the driver of the on-board device, obtain the internal state information of the on-board device, and through the driver interface, transfer the load data of the on-board device to the system monitoring module. The method for obtaining the load condition of the external device is the same as that of the on-board device.
[0126] Step S60, according to the real-time load condition, dynamically adjust the communication bandwidth allocated to the on-board device and the external device.
[0127] According to the actual load condition of the device, reasonably allocate the communication bandwidth to ensure that high-load devices obtain sufficient communication resources, and at the same time avoid low-load devices occupying too much bandwidth, thereby improving communication efficiency.
[0128] It should be noted that the communication bandwidth is the amount of data transmitted through the communication channel per unit time. The communication bandwidth determines the data transmission speed. The larger the bandwidth, the more data can be transmitted per unit time.
[0129] As an alternative implementation, use an algorithm based on proportion to allocate the bandwidth according to the proportion of the device load in the total system load.
[0130] Exemplarily, if the on-board device load accounts for 60% of the total load and the external device accounts for 40%, then allocate 60% of the communication bandwidth to the on-board device and 40% of the communication bandwidth to the external device according to the proportion.
[0131] Optionally, set weights for the on-board device and the external device, and allocate the initial bandwidth according to the weights. Adjust the initial bandwidth according to the real-time load condition.
[0132] Step S70, manage the access requests of the on-board device and the external device to the communication channel through the hardware interrupt controller, and determine the access right of the communication channel according to the device priority rule.
[0133] The importance and task urgency of different devices are different. By setting the device priority rule, ensure that key devices can obtain the communication channel access right first, transmit key data in time, and avoid task delays caused by channel occupation.
[0134] It should be noted that the hardware interrupt controller is a component on the motherboard responsible for managing interrupt requests. It receives the interrupt request signals sent by devices, processes the interrupt requests according to preset rules, and transfers the interrupt signals to the central processing unit. The communication channel is the path for data transmission between devices. Multiple devices can share the same communication channel, and a management mechanism is required to coordinate access. The device priority rule is a predefined priority order based on factors such as the type, use, and real-time load of the device, and is used to determine the access right of the device to the communication channel.
[0135] As an alternative embodiment, the hardware interrupt controller receives interrupt requests from on-board devices and external devices, queues and arbitrates the interrupt requests according to the device priority rules, so that the device with a higher priority obtains the access right to the communication channel, ensuring that high-priority devices can perform data transmission in a timely manner.
[0136] Optionally, in the hardware interrupt controller, the interrupt priorities are set for different devices through configuration registers. The interrupt priority of the on-board device for processing real-time tasks is set to the highest, and different priorities are set for external devices according to the importance of their functions.
[0137] Optionally, an interrupt vector table is established to associate the interrupt requests of different devices with the corresponding interrupt handlers. When the hardware interrupt controller receives an interrupt request, it quickly locates and executes the corresponding handler according to the interrupt vector table.
[0138] This embodiment provides a method for dynamically expanding and controlling a motherboard interface device. First, this embodiment monitors the real-time load conditions of the devices and allocates communication bandwidth according to the actual load requirements of the devices, ensuring that high-load devices can obtain more communication resources, thereby improving the data transmission rate. The hardware interrupt controller manages and arbitrates the access requests of the devices to ensure the orderly access of the devices to the communication channel, avoiding communication conflicts and data loss, and enhancing the stability of the system.
[0139] Based on Embodiment 1, Embodiment 3 of this application proposes a method for dynamically expanding and controlling a motherboard interface device. Referring to Figure 3 , the method for dynamically expanding and controlling the motherboard interface device further includes: Step B10, if a hot-plug event is detected, a control signal is sent to the corresponding communication interface to freeze the current communication link of the communication interface to prevent data loss or damage.
[0140] When a hot-plug event occurs, the access of a new device or the removal of an old device may make the state of the communication link unstable. If the communication link is not frozen in time, the data being transmitted may be interrupted due to the sudden change of the interface state, resulting in data loss or damage. By freezing the communication link, system errors caused by hot-plugging can be prevented.
[0141] It should be noted that a hot-plug event is an operation event of directly inserting a hardware device during the operation of the system without shutting down the system power. The control signal is an electrical signal or data packet sent to the communication interface to freeze the current communication link of the ESPI communication interface and suspend the data transmission. The communication link is a data transmission channel established between the motherboard and the device through the ESPI communication interface, including physical connection and logical connection.
[0142] As an alternative implementation, based on the hot-plug detection pin of the communication interface chip, when a device is detected to be inserted, a hardware interrupt signal is generated. After receiving the interrupt signal, a control signal is sent to the ESPI communication interface through a hardware register to put the ESPI communication interface into a frozen state.
[0143] Optionally, the hot-plug event further includes an operation event of directly unplugging a hardware device during the operation of the system without shutting down the system power.
[0144] As another alternative implementation for hot-plug event detection, the status register of the communication interface is polled regularly to check if a hot-plug event has occurred.
[0145] Step B20, allocate an independent buffer for the new device connected to the communication interface, and dynamically update the corresponding driver based on the type of the new device.
[0146] Provide an independent memory space for the newly connected device for data buffering to ensure the stability of data transmission, and dynamically update the driver according to the device type to achieve compatibility and function support.
[0147] It should be noted that the independent buffer is a dedicated memory space allocated for the new device, which is used to temporarily store data to avoid data confusion and conflicts and ensure the stability of data transmission.
[0148] Exemplarily, when a new device is detected to be connected, a continuous memory space is allocated from the memory pool as the independent buffer of the new device. By reading the identification information of the new device, a matching driver is found and loaded in the driver database, and the driver list in the memory is dynamically updated.
[0149] Optionally, the size of the independent buffer is dynamically adjusted according to the type of the device and the expected data transmission volume.
[0150] Optionally, for a new device for which the corresponding driver is not pre-installed in the driver database, connect to the server of the driver vendor through the network to download and install the latest driver.
[0151] Step B30, switch the single-channel communication mode to the dual-channel communication mode. If the communication mode switch fails, trigger a rollback mechanism to restore to the single-channel communication mode, and notify the user side of the reason for the mode switch failure.
[0152] After a hot-plug event, switch the communication mode from single-channel to dual-channel to support the communication requirements of the new device. If the switch fails, trigger a rollback mechanism to ensure the stable operation of the system.
[0153] It should be noted that the rollback mechanism is a mechanism that restores the system state to the state before the operation when the system operation fails.
[0154] Exemplarily, by sending a control command to the motherboard to modify the register value of the motherboard, the single-channel communication mode is switched to the dual-channel communication mode. During the communication mode switching process, the execution of the switching operation is monitored in real time. If it is determined that the switching fails according to the preset error judgment conditions, the rollback mechanism is triggered to restore the configuration parameters of the communication interface to the single-channel communication mode state before the switching. The reason for the failure of the communication mode switching is recorded in the system log, and the corresponding error prompt message is displayed on the operation interface of the user terminal.
[0155] This embodiment provides a dynamic expansion control method for a motherboard interface device. Firstly, by freezing the communication link in this embodiment, data loss or damage caused by hot plugging operations is effectively prevented, ensuring data integrity. By allocating an independent buffer for the new device, data transmission conflicts are avoided, improving the utilization rate of system resources. By dynamically updating the driver, it is ensured that the new device is compatible with the motherboard. When the communication mode switching fails, the rollback mechanism is triggered to ensure the stable operation of the system, and the user is notified in a timely manner of the reason for the failure of the mode switching, facilitating the user to quickly respond and solve the problem.
[0156] Exemplarily, in order to help understand the implementation process of the dynamic expansion control method of the motherboard interface device obtained by combining the above-mentioned Embodiment 1, please refer to Figure 5 , Figure 5 A brief flow schematic diagram of a dynamic expansion control method for a motherboard interface device is provided. Specifically: Based on the power button triggered by the user, the power management circuit receives the signal and starts to supply power to the motherboard. The startup circuit on the motherboard is activated, and the system initializes the hardware devices. During this process, the motherboard defaults to start in the single-channel communication mode and enters the boot state.
[0157] Furthermore, during the startup process, all M.2 slots on the motherboard are detected through pre-defined general-purpose input / output pins, the detection signal is sent to these M.2 slots, and the returned response signal is listened to check whether there is a second ESPI (Enhanced Serial Peripheral Interface) device connected to the motherboard through the M.2 slot.
[0158] If the second ESPI device is not detected, the operation will continue according to the preset conventional startup process, successively loading the hardware device drivers on the motherboard, initializing the system memory, detecting and configuring the storage device, and finally booting the operating system.
[0159] If a second ESPI device is detected, pause the normal startup process and instead enter the configuration phase. Read the settings information of the soft jumper area from the basic input / output system flash memory, and compare each of the read soft jumper settings with the configuration requirements of the dual communication device to check for any mismatches, in order to detect whether the soft jumper area is compatible with the dual communication device.
[0160] If it is detected that the soft jumper area is compatible with the dual communication device, continue to operate according to the normal startup process, load the operating system and other necessary drivers to ensure that the system can start up normally and use all connected communication devices.
[0161] When it is detected that the soft jumper area is not compatible with the dual communication device, generate new soft jumper settings according to the configuration requirements of the dual communication device, and rewrite the soft jumper area through the basic input / output system to adapt to the dual communication device.
[0162] Furthermore, according to the configuration and current state of the system, the embedded controller controls the motherboard to enter the G3 state; After entering the G3 state, immediately restart the motherboard and execute the device detection step again to ensure that the soft jumper settings have taken effect and all communication devices can work properly.
[0163] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the method for dynamically expanding and controlling the motherboard interface device of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0164] The present application provides a device for dynamically expanding and controlling a motherboard interface device. The device for dynamically expanding and controlling the motherboard interface device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for dynamically expanding and controlling the motherboard interface device in the first embodiment above.
[0165] The following refers to Figure 6 , which shows a schematic structural diagram of a device for dynamically expanding and controlling a motherboard interface device suitable for implementing the embodiments of the present application. The device for dynamically expanding and controlling the motherboard interface device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, personal digital assistants (PDAs), tablet computers (PADs), etc., and fixed terminals such as desktop computers, etc. Figure 6The dynamic expansion control device of the main board interface device shown is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
[0166] As Figure 6 shown, the dynamic expansion control device of the main board interface device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM, Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM, Random Access Memory) 1004. In the random access memory 1004, various programs and data required for the operation of the dynamic expansion control device of the main board interface device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD, Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the dynamic expansion control device of the main board interface device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a dynamic expansion control device of a main board interface device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be alternatively implemented or had.
[0167] Specifically, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0168] The dynamic expansion control device of the motherboard interface device provided by this application adopts the dynamic expansion control method of the motherboard interface device in the above embodiment, and can solve the technical problem of how to dynamically adjust the communication mode of the motherboard to adapt to the changes of external devices. Compared with the prior art, the beneficial effects of the dynamic expansion control device of the motherboard interface device provided by this application are the same as those of the dynamic expansion control method of the motherboard interface device provided by the above embodiment, and other technical features in the dynamic expansion control device of the motherboard interface device are the same as those disclosed in the method of the previous embodiment, which will not be elaborated here.
[0169] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0170] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0171] This application provides a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the dynamic expansion control method of the motherboard interface device in the above embodiment.
[0172] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination of the above.
[0173] The above computer-readable storage medium can be included in the dynamic expansion control device of the motherboard interface device; or it can exist independently and not be assembled into the dynamic expansion control device of the motherboard interface device.
[0174] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the dynamic expansion control device of the motherboard interface device, the dynamic expansion control device of the motherboard interface device can write computer program code for performing the operations of this application in one or more programming languages or combinations thereof. The above programming languages include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0175] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0176] The modules described in the embodiments of the present application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0177] The readable storage medium provided by the present application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned dynamic expansion control method of the motherboard interface device, and can solve the technical problem of how to dynamically adjust the communication mode of the motherboard to adapt to changes in external devices. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the dynamic expansion control method of the motherboard interface device provided in the above embodiments, and will not be elaborated here.
[0178] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made using the specification and drawings of the present application under the technical concept of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A dynamic expansion control method for a motherboard interface device, characterized in that, The dynamic expansion control method for the main board interface device includes: In response to the main board power-on operation, control the main board to start with the single-channel communication mode as the initial mode, and complete the handshake communication with the on-board devices fixedly installed on the main board; Detect all communication interfaces on the main board through predefined general-purpose input / output pins to determine whether there is an external device; If it is detected that there is an external device on the communication interface, switch from the single-channel communication mode to the dual-channel communication mode through the soft jumper area rewriting function in the basic input / output system flash memory, and trigger the main board to power down to a preset state; Control the main board to restart with the dual-channel communication mode, complete the communication handshake with the on-board devices and the external device in sequence, and load the dual-channel communication driver to achieve dual-device power-on.
2. The dynamic expansion control method of the motherboard interface device according to claim 1, characterized in that The step of "In response to the main board power-on operation, control the main board to start with the single-channel communication mode as the initial mode, and complete the handshake communication with the on-board devices fixedly installed on the main board" includes: In response to the main board power-on operation, load the pre-configured single-channel communication driver program from the basic input / output system; Based on the single-channel communication driver program, initialize the registers and interrupt settings of the communication interface, and control the main board to start with the single-channel communication mode; In the single-channel communication mode, send a handshake request signal to the on-board device through the communication interface, and receive the response signal of the on-board device to complete the handshake communication.
3. The dynamic expansion control method of the motherboard interface device according to claim 1, wherein The step of "Detect all communication interfaces on the main board through predefined general-purpose input / output pins to determine whether there is an external device" includes: Judge whether there is an external device on the communication interface by reading the pin voltage of the general-purpose input / output pin; If the pin voltage jumps from the low level state to the high level state, it is determined that there is an external device; If the level state of the pin voltage remains unchanged, it is determined that there is no external device.
4. The dynamic expansion control method of the motherboard interface device according to claim 1, characterized in that The step of "Detect all communication interfaces on the main board through predefined general-purpose input / output pins to determine whether there is an external device" further includes: If it is detected that there is an external device on the communication interface, send a handshake signal to the communication interface through the general-purpose input / output pin; Receive and analyze the response signal returned by the external device to obtain the characteristics of the response signal; Judge the characteristics of the response signal according to the handshake success conditions specified in the ESPI protocol specification to determine whether the external device is an ESPI device; If the characteristics of the response signal meet the handshake success conditions, it is determined that the handshake with the external device is successful, that is, the external device is an ESPI device.
5. The dynamic expansion control method of the motherboard interface device according to claim 1, characterized in that, The step of "If it is detected that there is an external device on the communication interface, switch from the single-channel communication mode to the dual-channel communication mode through the soft jumper area rewriting function in the basic input / output system flash memory, and trigger the main board to power down to a preset state" includes: Through the flash memory management function of the basic input / output system, access the soft jumper area, and read and verify the soft jumper area to ensure that the soft jumper area is in a writable state; Generate configuration information for switching the communication mode from the single-channel communication mode to the dual-channel communication mode, and write it into the soft jumper area; Send a deep sleep power-off instruction to the motherboard through register operations of the embedded controller or the south bridge chip to trigger the motherboard to power off to a preset state.
6. The dynamic expansion control method of the motherboard interface device according to claim 1, wherein The steps of controlling the motherboard to restart in the dual-channel communication mode, sequentially completing communication handshakes with the on-board devices and the external devices, and loading the dual-channel communication driver to achieve dual-device startup include: Send a restart instruction to the power control unit of the motherboard through the embedded controller to control the motherboard to restart in the dual-channel communication mode; Based on the dual-channel communication mode, sequentially complete communication handshakes with the on-board devices and the external devices in a predefined order; Load the dual-channel communication driver program in the basic input / output system to allocate independent communication channels and interrupt resources for the on-board devices and the external devices; Synchronously process the data transfer requests of the on-board devices and the external devices through a polling mechanism or an event trigger mechanism to achieve dual-device startup.
7. The dynamic expansion control method of the motherboard interface device according to claim 1, characterized in that, After the steps of controlling the motherboard to restart in the dual-channel communication mode, sequentially completing communication handshakes with the on-board devices and the external devices, and loading the dual-channel communication driver to achieve dual-device startup, it includes: Monitor the real-time load conditions of the on-board devices and the external devices; Dynamically adjust the communication bandwidth allocated to the on-board devices and the external devices according to the real-time load conditions; Manage the access requests of the on-board devices and the external devices to the communication channels through the hardware interrupt controller, and determine the access rights of the communication channels according to the device priority rules.
8. The dynamic expansion control method of the motherboard interface device according to claim 1, characterized in that, The dynamic expansion control method of the motherboard interface device further includes: If a hot plug event is detected, send a control signal to the corresponding communication interface to freeze the current communication link of the communication interface to prevent data loss or damage; Allocate an independent buffer for the new device connected to the communication interface, and dynamically update the corresponding driver program based on the type of the new device; Switch the single-channel communication mode to the dual-channel communication mode. If the communication mode switch fails, trigger a rollback mechanism, restore to the single-channel communication mode, and notify the user end of the reason for the mode switch failure.
9. A dynamic expansion control device for a motherboard interface device, characterized in that The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the dynamic expansion control method of the motherboard interface device according to any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, it implements the steps of the dynamic expansion control method of the motherboard interface device according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multiple connections to a single serial interface
CN101601001A
Enhanced SPI device and method for data transmission by using device
CN107436857A
Communication system, communication method, communication device, communication equipment and storage medium
CN111522766A
Mainboard hardware fault diagnosis circuit and device
CN117851106A
Bus system and detection method thereof
US20190361832A1