[go: up one dir, main page]

CN120277016B - Dynamic expansion control method, device and storage medium for motherboard interface device - Google Patents

Dynamic expansion control method, device and storage medium for motherboard interface device

Info

Publication number
CN120277016B
CN120277016B CN202510765365.1A CN202510765365A CN120277016B CN 120277016 B CN120277016 B CN 120277016B CN 202510765365 A CN202510765365 A CN 202510765365A CN 120277016 B CN120277016 B CN 120277016B
Authority
CN
China
Prior art keywords
communication
motherboard
equipment
communication mode
main board
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202510765365.1A
Other languages
Chinese (zh)
Other versions
CN120277016A (en
Inventor
吴福禄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Seavo Technology Co ltd
Original Assignee
Shenzhen Seavo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Seavo Technology Co ltd filed Critical Shenzhen Seavo Technology Co ltd
Priority to CN202510765365.1A priority Critical patent/CN120277016B/en
Publication of CN120277016A publication Critical patent/CN120277016A/en
Application granted granted Critical
Publication of CN120277016B publication Critical patent/CN120277016B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Power Sources (AREA)

Abstract

本申请公开了一种主板接口设备的动态扩展控制方法、设备及存储介质,涉及电数字数据处理技术领域,包括:响应于主板开机操作,控制主板以单路通信模式为初始模式启动,完成与板载设备的握手通信,板载设备固设于主板;通过预定义的通用输入输出引脚检测主板上的所有通信接口,以确定是否存在外接设备;若检测到通信接口上存在外接设备,通过基本输入输出系统闪存中的软跳线区域改写功能,从单路通信模式切换为双路通信模式,并触发主板下电至预设状态;控制主板以双路通信模式重新启动,依次与板载设备及外接设备完成通信握手,加载双路通信驱动以实现双设备开机。本申请达成了动态调整主板的通信模式的技术效果。

The present application discloses a method, device and storage medium for dynamically expanding a motherboard interface device, and relates to the field of electronic digital data processing technology, including: in response to a motherboard power-on operation, controlling the motherboard to start up in a single-channel communication mode as the initial mode, completing handshake communication with an onboard device, wherein the onboard device is fixed to the motherboard; detecting all communication interfaces on the motherboard through predefined general-purpose input/output pins to determine whether an external device exists; if an external device is detected on the communication interface, switching from a single-channel communication mode to a dual-channel communication mode through a soft jumper area rewriting function in a basic input/output system flash memory, and triggering the motherboard to be powered off to a preset state; controlling the motherboard to restart in a dual-channel communication mode, completing communication handshakes with the onboard device and the external device in turn, and loading a dual-channel communication driver to realize dual-device startup. The present application achieves the technical effect of dynamically adjusting the communication mode of the motherboard.

Description

Dynamic expansion control method and device for main board interface device and storage medium
Technical Field
The present application relates to the field of electronic digital data processing technologies, and in particular, to a method and apparatus for controlling dynamic expansion of a motherboard interface device, and a storage medium.
Background
In the current design of a motherboard of an Intel platform, the number of devices supported by an ESPI (ENHANCED SERIAL PERIPHERAL INTERFACE ) interface is set in a motherboard firmware, and after the motherboard firmware is burnt, configuration parameters of the ESPI are cured, so that the number of supported devices cannot be dynamically modified. And the starting-up of the main board depends on ESPI handshake, communication handshake with a set number of devices is required to be completed, and starting-up operation can be continued after the completion of firmware loading is confirmed. When the dynamic expansion requirement is met, the system is insufficient, cannot be dynamically adjusted according to the access state of the external equipment in the operation process, and is difficult to adapt to the condition that the number of the external equipment is uncertain.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The application mainly aims to provide a dynamic expansion control method, equipment and storage medium of a main board interface device, and aims to solve the technical problem of how to dynamically adjust a communication mode of a main board to adapt to the change of external equipment.
In order to achieve the above object, the present application provides a method for controlling dynamic expansion of a motherboard interface device, the method for controlling dynamic expansion of a motherboard interface device comprising:
Responding to the starting operation of the main board, controlling the main board to start in a single-way communication mode as an initial mode, and completing handshake communication with on-board equipment, wherein the on-board equipment is fixedly arranged on the main board;
Detecting all communication interfaces on the main board through predefined general input/output pins to determine whether external equipment exists or not;
If the external equipment is detected to exist on the communication interface, switching from the single-path communication mode to a double-path communication mode through a soft jumper area rewriting function in the basic input/output system flash memory, and triggering a main board to be powered down to a preset state;
And controlling the main board to restart in the two-way communication mode, completing communication handshake with the on-board equipment and the external equipment in sequence, and loading two-way communication drive to realize double-equipment startup.
In an embodiment, the step of responding to the startup operation of the motherboard, controlling the motherboard to start in a single-way communication mode as an initial mode to complete handshake communication with the onboard device, wherein the onboard device is fixedly arranged on the motherboard includes:
loading a pre-configured one-way communication driver from a basic input/output system in response to the starting operation of the main board;
initializing a register and interrupt setting of a communication interface based on the single-way communication driver, and controlling the main board to start in the single-way communication mode;
And in the single-way communication mode, sending a handshake request signal to the on-board equipment through the communication interface, and receiving a response signal of the on-board equipment to finish handshake communication.
In an embodiment, the step of detecting all communication interfaces on the motherboard through predefined universal input/output pins to determine whether an external device exists includes:
judging whether the external equipment exists on the communication interface or not by reading the pin voltage of the universal input/output pin;
If the pin voltage jumps from a low level state to a high level state, determining that the external equipment exists;
And if the level state of the pin voltage is unchanged, judging that the external equipment does not exist.
In an embodiment, the step of detecting all communication interfaces on the motherboard through predefined universal input/output pins to determine whether an external device exists, further includes:
If the external equipment is detected to exist on the communication interface, sending a handshake signal to the communication interface through the universal input/output pin;
Receiving and analyzing a response signal returned by the external equipment to obtain the characteristics of the response signal;
judging the characteristics of the response signal according to a handshake success condition specified by ESPI protocol specification to determine whether the external equipment is ESPI equipment or not;
If the characteristics of the response signal meet the handshake success condition, the handshake with the external device is judged to be successful, namely the external device is ESPI device.
In an embodiment, if it is detected that the external device exists on the communication interface, the step of switching from the single-path communication mode to the two-path communication mode and triggering the motherboard to be powered down to a preset state through a soft jumper area rewriting function in the bios flash memory includes:
accessing the soft jumper region through the flash memory management function of the basic input/output system, and reading and verifying the soft jumper region to ensure that the soft jumper region is in a writable state;
Generating configuration information for switching a communication mode from the single-path communication mode to the two-path communication mode, and writing the configuration information into the soft jumper area;
And sending a deep sleep power-off instruction to the main board through the register operation of the embedded controller or the south bridge chip so as to trigger the main board to be powered down to a preset state.
In an embodiment, the step of controlling the motherboard to restart in the two-way communication mode, completing communication handshake with the onboard device and the external device in sequence, and loading the two-way communication drive to realize dual-device startup includes:
sending a restarting instruction to a power control unit of the main board through the embedded controller, and controlling the main board to restart in the two-way communication mode;
based on the two-way communication mode, completing communication handshake with the on-board device and the external device in sequence according to a predefined sequence;
loading a two-way communication driving program in a basic input/output system, and distributing independent communication channels and interrupt resources for the on-board equipment and the external equipment;
And synchronously processing the data transmission requests of the on-board device and the external device through a polling mechanism or an event triggering mechanism so as to realize the startup of the dual-device.
In an embodiment, the step of controlling the motherboard to restart in the two-way communication mode, completing communication handshake with the onboard device and the external device in sequence, and loading the two-way communication drive to realize dual-device startup includes:
monitoring real-time load conditions of the on-board equipment and the external equipment;
Dynamically adjusting the communication bandwidth allocated to the on-board equipment and the external equipment according to the real-time load condition;
and managing access requests of the on-board device and the external device to the communication channel through a hardware interrupt controller, and determining the access right of the communication channel according to a device priority rule.
In an embodiment, the method for controlling dynamic expansion of the motherboard interface device further includes:
If a hot plug event is detected, a control signal is sent to a corresponding communication interface, and a current communication link of the communication interface is frozen to prevent data loss or damage;
an independent buffer zone is allocated for new equipment accessed by the communication interface, and a corresponding driver program is dynamically updated based on the type of the new equipment;
And switching the single-path communication mode into a two-path communication mode, triggering a rollback mechanism if the communication mode fails to switch, recovering to the single-path communication mode, and notifying the reason of the failure of the mode switching to the user side.
In addition, in order to achieve the above object, the present application also proposes a dynamic expansion control device of 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 of a motherboard interface device as described above.
In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, the computer program implementing the steps of the dynamic expansion control method of a motherboard interface apparatus as described above when executed by a processor.
The application provides a dynamic expansion control method of a main board interface device, which comprises the steps of responding to a main board starting operation, controlling the main board to start in a single-way communication mode as an initial mode, completing handshake communication with an on-board device, fixedly arranging the on-board device on the main board, detecting all communication interfaces on the main board through a predefined general input/output pin to determine whether an external device exists or not, switching from the single-way communication mode to a double-way communication mode through a soft jumper area rewriting function in a flash memory of a basic input/output system if the external device exists on the communication interfaces, triggering the main board to be powered down to a preset state, controlling the main board to restart in the double-way communication mode, completing communication handshake with the on-board device and the external device in sequence, and loading double-way communication drive to realize double-device starting. The application simplifies the communication configuration and management during starting by starting in a single-way communication mode, ensures that the system can rapidly and stably complete the starting process, and avoids starting failure or unstable system caused by mismatching of communication modes or equipment conflict. By detecting the connection condition of external equipment on the communication interface in real time, whether the communication mode needs to be switched is determined, and the adaptability of the system to different equipment configurations is improved. The dynamic adjustment of the communication mode is realized through the soft jumper area rewriting function, and the flexibility of the control system is improved. Through loading double-circuit communication drive for the mainboard can support the collaborative work of on-board equipment and external equipment simultaneously, has improved data transmission efficiency. The application achieves the technical effect of dynamically adjusting the communication mode of the main board to adapt to the change of external equipment.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a dynamic expansion control method of a motherboard interface device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a second embodiment of a dynamic expansion control method of a motherboard interface device according to the present application;
FIG. 3 is a schematic flow chart of a third embodiment of a dynamic expansion control method for a motherboard interface device according to the present application;
fig. 4 is a schematic flow chart of a dynamic expansion control method embodiment four of a motherboard interface device according to the present application;
FIG. 5 is a schematic flow chart of a dynamic expansion control method of a motherboard interface device according to the present application;
Fig. 6 is a schematic device structure diagram of a hardware operating environment related to a dynamic expansion control method of a motherboard interface device in an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the technical solution of the present application and are not intended to limit the present application.
For a better understanding of the technical solution of the present application, the following detailed description will be given with reference to the drawings and the specific embodiments.
The main solutions of the embodiments of the present application are:
currently, in the design of a motherboard of an Intel platform, the number of devices supported by an ESPI (ENHANCED SERIAL PERIPHERAL INTERFACE ) interface is set in a motherboard firmware, and after the motherboard firmware is burned, configuration parameters of the ESPI are cured, so that the number of supported devices cannot be dynamically modified. And the starting-up of the main board depends on ESPI handshake, communication handshake with a set number of devices is required to be completed, and starting-up operation can be continued after the completion of firmware loading is confirmed. When the dynamic expansion requirement is met, the system is insufficient, cannot be dynamically adjusted according to the access state of the external equipment in the operation process, and is difficult to adapt to the condition that the number of the external equipment is uncertain.
By starting in the single-way communication mode, the application simplifies the communication configuration and management during starting, ensures that the system can rapidly and stably complete the starting process, and avoids starting failure or unstable system caused by mismatching of communication modes or equipment conflict. By detecting the connection condition of external equipment on the communication interface in real time, whether the communication mode needs to be switched is determined, and the adaptability of the system to different equipment configurations is improved. The dynamic adjustment of the communication mode is realized through the soft jumper area rewriting function, and the flexibility of the control system is improved. Through loading double-circuit communication drive for the mainboard can support the collaborative work of on-board equipment and external equipment simultaneously, adapts to the change of external equipment, has improved data transmission efficiency.
It should be noted that, the execution body of the embodiment may be a dynamic expansion control system of a motherboard interface device, or may be a computing service device with functions of data processing, network communication and program running, such as a tablet computer, a personal computer, a mobile phone, or a control device of a dynamic expansion control system of a motherboard interface device capable of implementing the above functions, which is not limited in this embodiment. The present embodiment and the following embodiments will be described below using a dynamic expansion control system of a motherboard interface device as an execution subject.
Example 1
Based on this, the present application proposes a method for controlling dynamic expansion of a motherboard interface device according to a first embodiment, referring to fig. 1, the method for controlling dynamic expansion of a motherboard interface device includes:
Step S10, responding to the starting operation of the main board, controlling the main board to start in a single-way communication mode as an initial mode, and completing handshake communication with on-board equipment, wherein the on-board equipment is fixedly arranged on the main board.
By taking the single-way communication mode as the initial starting mode, the communication configuration during starting is simplified, the starting failure caused by multi-device communication conflict or complex configuration is avoided, and the main board is ensured to be capable of smoothly establishing reliable communication connection with the on-board device.
In this embodiment, the motherboard startup operation is a user-triggered startup operation of the motherboard, and by pressing a power button on the host computer, a startup instruction is sent to the motherboard, so that the motherboard enters the startup process operation from the shutdown state. The main board is a core component in the computer system and is a junction for connecting all hardware components of the computer and is responsible for coordinating the work among all the components and transmitting data and instructions. The single-channel communication mode is that the main board uses only one communication channel to communicate with the on-board equipment in the initial starting stage, and compared with the multi-channel communication mode, the single-channel communication mode has a relatively simple structure and simple communication logic, can reduce the probability of errors or conflicts in the communication process, and ensures the stability of communication. The on-board equipment is hardware equipment directly integrated on the main board, and the on-board equipment is fixedly arranged on the main board and is communicated with the main board and data interacted with the main board through an ESPI communication interface of the main board. ESPI communication interface is a computer hardware interface that provides a communication connection between a central processing unit (CPU, central Processing Unit) on a motherboard and other hardware devices. Handshake communication is a communication protocol or procedure for establishing a reliable communication connection between a motherboard and an on-board device, during which the two devices exchange signals or data packets according to predefined rules and sequences to confirm the existence of each other, the consistency of communication parameters, and the availability of communication channels.
As an alternative implementation manner, a power-on signal of a user pressing a power button is received, a power management module of a main board is triggered to start working, the power management module sends a starting signal to a power control chip on the main board, and after the power control chip receives the starting signal, the power control chip starts to supply power to each hardware component on the main board. The basic input and output system or the unified extensible firmware interface on the main board starts to operate after receiving the starting signal, and the ESPI communication interface is configured into a single-way communication mode by setting register parameters of the ESPI communication interface. And sending a handshake request signal to the on-board equipment through a predefined ESPI communication interface, configuring working parameters such as communication rate, buffer area size, interrupt priority and the like of the on-board equipment according to a response signal returned after the on-board equipment receives the handshake request, completing establishment of a communication link, and entering a starting-up state.
Optionally, for a main board supporting a remote wake-up function, based on the network interface chip, a wake-up instruction sent by a user through a network is received and transmitted to a power management chip of the main board, the power management chip analyzes and verifies the instruction, and after confirming that the instruction is correct, a start-up initialization flow of the main board is started, so that remote start-up is realized.
Optionally, if the main board does not receive the response signal of the on-board device within the specified timeout after sending the handshake request signal, automatically resends the handshake request signal, and if the number of retries reaches the predetermined number, handshake communication still cannot be completed, reporting an error message, and prompting the user that a hardware fault may exist.
Optionally, step S10 includes:
and step S11, in response to the starting operation of the main board, loading a pre-configured one-way communication driver from the basic input/output system.
A pre-configured single-way communication driver is loaded from the basic input/output system, and necessary software support is provided for the subsequent initialization of a communication interface and the starting of a single-way communication mode based on the driver.
It should be noted that, the Basic Input/Output System (BIOS) is a program solidified in a read-only memory chip on a computer motherboard, and stores the most important Basic Input/Output program, system setting information, self-checking program after startup and System self-starting program of the computer. The single-pass communication driver is a driver stored in the main board and containing an initialization code.
Optionally, after compiling the pre-written single-channel communication driver code, the single-channel communication driver code is stored in a specific storage area of the basic input/output system chip of the main board. When the main board responds to the starting operation, the basic input/output system sequentially executes each program module stored in the main board according to a preset starting flow. When the communication initialization related module is executed, the basic input/output system locates the address area storing the single-channel communication driver program and loads the driver program code into the memory.
As an alternative implementation manner, according to the hardware configuration of the main board and the starting mode of the one-way communication mode, a proper one-way communication driver is selected from the stored driver list to load.
Optionally, during the loading process, the bios may perform integrity checks on the driver to ensure that the code is not corrupted or erroneous.
And step S12, initializing a register and interrupt setting of a communication interface based on the single-way communication driver, and controlling the main board to start in the single-way communication mode.
Based on the loaded single-way communication driving program, initializing the register and interrupt of the communication interface, so that the communication interface can work normally according to the requirement of the single-way communication mode, thereby controlling the main board to start in the single-way communication mode and preparing hardware for subsequent communication with the on-board equipment.
It should be noted that the communication interface is an ESPI communication interface, and is used on the motherboard to implement physical and logical data transmission between the motherboard and the on-board device, including a hardware circuit and a software-defined communication protocol. Registers are fast memory units within a central processing unit or other chip for storing data and instructions, and registers are used for storing communication-related configuration information, status information, and control commands. The interrupt is a hardware mechanism, when the ESPI communication interface receives data, sends a complete event, and the like, an interrupt request signal is sent to the central processing unit to inform the central processing unit to pause the currently executing program, and the corresponding interrupt processing program is executed. The interrupt setting includes setting an interrupt trigger mode, an interrupt priority, an interrupt vector table, etc. to ensure that the central processor responds to the interrupt request of the ESPI communication interface timely and accurately.
As an alternative implementation manner, through a single-way communication driver, corresponding functions or instructions are provided according to the requirements of a single-way communication mode, and the functions or instructions are called by a central processing unit to perform read-write operation on each register of the ESPI communication interface so as to initialize configuration. And setting interrupt triggering conditions and interrupt processing programs according to the functions and requirements of the communication interface through the single-way communication driver.
Illustratively, according to the function or instruction provided by the single-way communication driver, the central processing unit performs read-write operation on each register of the communication interface, sets the communication mode register to be a single-way communication mode, configures the communication rate register to be a set transmission rate, and sets the data bit width register to be a set bit width. The corresponding interrupt processing program address is registered in the interrupt vector table through the single-way communication driving program, when the communication interface receives the data sent by the on-board equipment, the communication interface triggers a receiving interrupt, and the central processing unit jumps to the corresponding interrupt processing program to execute according to the interrupt vector table so as to process the received data through the interrupt processing program. Processing the received data includes verifying the integrity of the data, storing the data in a designated memory area, and the like.
Step S13, in the single-way communication mode, a handshake request signal is sent to the on-board equipment through the communication interface, and a response signal of the on-board equipment is received, so that handshake communication is completed.
In the single-way communication mode, handshake communication is carried out between the initialized ESPI communication interface and the on-board equipment, and existence and normal communication of the equipment of the two parties are confirmed, so that the system enters a starting state, and preparation is made for further starting and running of the system.
It should be noted that, the handshake request signal is a signal sent by the motherboard to the on-board device, and is used for initiating a handshake communication process, where the handshake request signal includes information such as device information and communication parameters of the motherboard. The response signal is a signal returned by the on-board device according to the state and configuration after the on-board device receives the handshake request signal, and contains relevant information such as the device type and the supported communication parameters of the on-board device, and the main board can confirm the existence and the communication state of the on-board device by receiving and analyzing the response signal.
As an alternative implementation, after initializing the ESPI communication interface, the ESPI communication interface is controlled by a one-way communication driver to send a handshake request signal to the on-board device according to a predefined communication protocol and format. And continuously monitoring signals on the bus through the ESPI communication interface, when a response signal sent by the on-board equipment is detected, analyzing the response signal by the single-channel communication driver according to a communication protocol, extracting key information in the response signal, comparing and verifying the key information with pre-stored information, and if the verification is passed, successfully completing handshake communication between the main board and the on-board equipment. The bus is a public communication trunk line for transmitting information among various functional components on the main board, and is a data channel for connecting components such as a central processing unit, a memory, a cache, an external control chip and the like.
Step S20, detecting all communication interfaces on the motherboard through predefined universal input/output pins to determine whether an external device exists.
When the main board is in a starting-up state, detecting the connection states of external devices of all communication interfaces on the main board, knowing the connection condition of the main board and the external devices in real time, and determining whether the external devices exist or not, thereby providing basis for subsequent communication mode switching and device management.
In this embodiment, a general purpose input/Output pin (GPIO, general Purpose Input/Output) is a flexible configurable pin on a motherboard, and can be set to an input or Output mode according to a system requirement, and when the GPIO is used as an input pin, a high-low level state of an external signal can be detected, and when the GPIO is used as an Output pin, a control signal can be sent to an external device. The communication interface on the main board comprises a carrier ESPI interface and a main board M.2 slot, wherein the carrier ESPI interface is an interface designed for custom equipment developed by a third party, flexible expansion is supported, the interface design is non-standardized, different carrier ESPI interfaces can carry ESPI equipment with different functions and different specifications, and the main board M.2 slot is a standardized high-speed expansion interface and is used for connecting an ESPI peripheral card of the M.2 interface.
As an alternative implementation, the predefined pin is configured as an input mode by setting a pin register to read the electrical signals of all ESPI communication interfaces on the motherboard. And periodically polling to detect the level state of the universal input/output pins, reading the values of all the universal input/output pins for detecting the connection state of the external device, and storing the read values in a memory. And comparing the level value of the current read general input/output pin with the last read value in the memory to judge whether level change occurs. If the level of the general input/output pin corresponding to the ESPI communication interface changes, the external equipment is judged to be inserted into the ESPI communication interface.
As an optional implementation manner of detecting the communication interfaces, traversing and detecting all ESPI communication interfaces, sequentially reading the level states of the universal input/output pins corresponding to each ESPI communication interface according to a preset sequence, and recording whether the ESPI communication interface corresponding to each pin is connected with external equipment or not after detecting one pin.
As an optional implementation manner of the detection communication interface, all ESPI communication interfaces are detected in full quantity, and meanwhile level state reading is carried out on all universal input/output pins for detecting the external equipment of the ESPI communication interfaces, unified judgment is carried out on the read level states, and whether each ESPI communication interface is connected with the external equipment is determined.
The general input/output pins are connected to the power pins of the m.2 slots on the motherboard, and are configured into an input mode through the basic input/output system, and the internal pull-up resistor is enabled to periodically read the level states of the general input/output pins so as to determine whether the m.2 slots are connected with external devices.
Alternatively, the level of the general purpose input/output pin may appear to shake at the moment of device insertion or extraction due to mechanical contact or the like. And simultaneously performing software debouncing and continuously detecting the level state for a plurality of times, and if the detection results are consistent, considering the level to be stable.
Optionally, step S20 includes:
Step S21, judging whether the external device exists on the communication interface or not by reading the pin voltage of the general input/output pin.
It should be noted that the pin voltage is a potential difference carried on the universal input/output pin, and the pin voltage is measured excessively, so that the external circuit state connected with the pin can be judged, and further whether an external device exists on the communication interface is determined.
As an alternative implementation mode, the general input/output pin is configured into an input mode, and the microcontroller periodically polls the analog voltage value of the read pin, converts the analog voltage value into a digital signal, compares the digital signal with the level state of the history record, and judges whether external equipment exists on the communication interface.
Optionally, the voltage value of the pin read each time is recorded, and the level state of the current pin is saved, so that the current pin can be compared with the history record later, and whether the level state changes or not is judged.
Step S22, if the pin voltage jumps from the low level state to the high level state, determining that the external device exists.
The current read pin voltage value is converted into a level state according to a preset high-low level threshold value, and compared with a historical level state, and if the current level state is a high level and the historical level state is a low level, the pin voltage is indicated to jump from the low level state to the high level state. According to the hardware design specification, when the voltage of the universal input/output pin jumps from a low level to a high level, the external equipment is inserted in the corresponding communication interface, and the external equipment is judged to exist in the communication interface corresponding to the input/output pin.
Optionally, if in the hardware design specification of the motherboard, when the communication interface is not connected with the external device, the voltage of the corresponding universal input/output pin is at a high level, at this time, when the voltage of the universal input/output pin jumps from the high level to the low level, it indicates that the corresponding communication interface has the external device inserted, and it is determined that the communication interface corresponding to the input/output pin has the external device.
Step S23, if the level state of the pin voltage is unchanged, judging that the external device is not present.
The current read pin voltage value is converted into a level state, and compared with the level state recorded last time, and if the level states are the same for two times, that is, the level state of the pin voltage is not changed, it is determined that no external device exists in the communication interface.
Step S30, if the external device is detected to exist on the communication interface, the single-channel communication mode is switched to the two-channel communication mode through the soft jumper area rewriting function in the flash memory of the basic input/output system, and the main board is triggered to be powered down to a preset state.
When detecting that an external device is connected to the communication interface, dynamically adjusting the communication mode of the main board to adapt to new device configuration requirements, switching from a single-channel communication mode to a two-channel communication mode, triggering the main board to be powered off and restarted, ensuring that the system can stably operate in the new communication mode, and simultaneously avoiding the problem that the device cannot work normally or the system is unstable due to mismatching of the communication modes.
In this embodiment, the Basic Input/Output system flash memory (Basic Input/Output SYSTEM FLASH) is a flash memory chip storing a Basic Input/Output system program, and has an erasable characteristic, allowing a user or a system to update and modify the Basic Input/Output system program. The soft jumper area is a specific area divided in the flash memory of the basic input/output system and is used for storing parameters which can be configured and modified by software, and the hardware configuration of the main board can be dynamically adjusted without changing physical jumpers by modifying the content of the soft jumper area. The overwrite function is the ability to modify the contents of the soft jumper area through software operations. The two-way communication mode is a mode of adopting two independent communication channels to simultaneously carry out data transmission, and the two channels can be used for transmitting different data in parallel, so that the data transmission rate is improved, and the cooperative work of more devices is supported. The preset state includes a power-off state or a low-power-consumption state, the power-off state is a power-free state that the main board completely cuts off the power supply, and all hardware components enter after stopping working, namely a G3 state in a power management specification (ACPI, advanced Configuration and Power Interface), at this time, the main board is completely closed, and all other hardware except a real clock is powered by an internal battery is powered off, and the power-off state is a state that the power supply is completely cut off in a mechanical mode. The low power consumption state is a state that the main board enters a low power consumption sleep mode, part of hardware keeps power supply to maintain basic functions, including an S3 state in a power management specification, at this time, the main board stores a system state into a memory, power supply of most hardware devices is closed, and only memory power supply is reserved, and an S4 state in the power management specification, at this time, the main board stores the system state into a disk, power supply of all hardware devices is closed, including the memory, and other low power consumption states specified in the power management specification.
As an optional implementation manner, after detecting that the external device exists, the bios accesses the corresponding bios flash memory, writes a corresponding code according to the soft jumper parameter for switching the communication mode, writes a new parameter value into the soft jumper area of the bios flash memory chip, and switches from the single-path communication mode to the two-path communication mode. After the communication mode switching is completed, the basic input/output system triggers the main board to enter a G3 state of complete power failure by sending a power failure instruction to the power management controller of the main board.
As another optional implementation manner for entering the preset state, after the communication mode switching is completed, determining the low power consumption state that the main board needs to enter, and if it is determined that the main board enters the S3 state, triggering the main board to enter the S3 state with low power consumption by sending an S3 instruction to the power management controller of the main board by the basic input output system.
Optionally, the two-way communication mode is switched when only one external device is accessed, but if the main board detects a plurality of external devices, the two-way communication mode can be switched to the multiple-way communication mode with the number of communication channels corresponding to the number of the external devices, and the switching method is the same as the two-way communication mode switching method.
Optionally, step S30 includes:
Step S31, accessing the soft jumper area through the flash memory management function of the basic input/output system, and reading and verifying the soft jumper area to ensure that the soft jumper area is in a writable state.
Before the soft jumper area is modified, the area is ensured to be in a writable state, so that configuration information writing failure caused by non-writable area is avoided, and smooth proceeding of subsequent communication mode switching is ensured.
By way of example, the basic input/output system sends a read command to the flash memory chip to obtain current state information of the soft jumper region, including a write protection flag bit and the like. If the write protection flag bit is 0, the write protection state is not activated, and the area is judged to be in a writable state. If the write protection flag bit is 1 and is in a write protection state, sending a command for removing write protection, and performing state verification after removing the write protection.
And step S32, generating configuration information for switching the communication mode from the single-path communication mode to the two-path communication mode, and writing the configuration information into the soft jumper area.
Configuration information for switching the communication mode from a single channel to a double channel is accurately written into the soft jumper area, so that the main board can carry out hardware initialization according to a new communication mode when the main board is started next time, and the switching of the communication mode is realized.
It should be noted that the configuration information refers to a data set for defining an operating state and parameters of the motherboard hardware, and includes all parameters and settings required for switching the communication mode from one-way to two-way, such as register configuration, interrupt allocation, memory mapping, and the like of the communication interface.
Optionally, according to the design document of the main board hardware and the specification of the communication interface, determining configuration information required for switching the communication mode from a single channel to a double channel, and generating a corresponding data structure according to the determined configuration information content according to a program written in a programming language. The code to which the configuration information is written is integrated into the basic input output system.
Illustratively, when a need to switch communication modes is detected, accessing the soft jumper area through the basic input output system, executing codes for writing configuration information, and writing the configuration information into the soft jumper area through a hardware interface.
Step S33, a deep sleep power-off instruction is sent to the main board through the register operation of the embedded controller or the south bridge chip, so as to trigger the main board to be powered down to a preset state.
And the main board is powered down to a preset state by sending a deep sleep power-off instruction so as to be started in a new communication mode after being powered up again, thereby ensuring that the communication mode is switched into effect and avoiding hardware conflict or data loss caused by the live switching.
It should be noted that, the embedded controller is an independent microcontroller on the motherboard, is responsible for managing low-speed devices such as power supply, and communicates with the basic input/output system to realize the power supply management function. The south bridge chip is an important component of the mainboard chipset, is responsible for hardware functions such as power management and the like, and is a key component for carrying out data interaction and control on the mainboard and external equipment. The register is a memory unit inside the chip for storing control information and status information. The deep sleep power-off instruction is a power management instruction, and is used for instructing the motherboard to enter a G3 state and cut off the power supply, where the deep sleep power-off instruction can ensure that each hardware component of the motherboard completely stops working, and save the system state into the nonvolatile memory, so as to restore to the previous state when restarting.
As an alternative embodiment, the relevant register address for controlling the motherboard power management and the instruction value for triggering the deep sleep power down are determined based on the data manual of the embedded controller. And the basic input/output system is communicated with the embedded controller, and a deep sleep power-off instruction value is written into the target register address, so that the main board is powered down to a preset state.
As another alternative implementation, a register address and a deep sleep power-off instruction value of the south bridge chip for controlling the power state of the motherboard are obtained. A power management specification table is written in a basic input output system, wherein a method for triggering deep sleep power down by operating a register of a south bridge chip is defined. When the operating system is started, the power management standard table is loaded, and a corresponding method is called to realize the power management function. When the mainboard needs to be triggered to be powered off, the method is called, and a deep sleep power-off instruction value is written into a designated register of the south bridge chip through a hardware abstraction layer interface provided by a power management specification, so that the mainboard is powered off to a preset state.
Optionally, after the single-path communication mode is switched to the two-path communication mode, the embedded controller or the edge substrate management controller can also control the main board to enter a low-power consumption G3 state.
And step S40, controlling the main board to restart in the two-way communication mode, completing communication handshake with the on-board equipment and the external equipment in sequence, and loading two-way communication drive to realize double-equipment startup.
The mainboard is enabled to complete a starting process according to the newly configured two-way communication mode, stable and efficient communication connection is established with the on-board equipment and the external equipment, and a driving program adapting to two-way communication is loaded, so that the cooperative work of the on-board equipment and the external equipment in the two-way communication mode is realized, the performance advantage of the two-way communication mode is fully exerted, the data transmission efficiency and the system performance are improved, and the requirement of efficient cooperation between the equipment in a complex application scene is met.
In this embodiment, the two-way communication driver is a software program designed for the two-way communication mode, and is used for managing and controlling data transmission of the motherboard, the on-board device and the external device in the two-way communication mode.
As an alternative implementation, the power supply is powered up again immediately after the power of the main board is cut off, and the power supply management module supplies power to each hardware component on the main board. The basic input and output system reads the configuration information of the soft jumper area, and initializes the register and interrupt setting of the communication interface according to the configuration information of the two-way communication mode, so as to ensure that the communication interface can support two-way communication. Enumerating the on-board device and the external device, identifying the type, the model, the unique identifier and the connected communication interface of each device, and carrying out communication handshake with the on-board device and the external device in sequence according to a predefined sequence. After the device communication handshake is completed, according to the hardware ID and the device type of the device, a corresponding two-way communication driver is automatically searched and loaded from a driver library. And the data transmission between the main board and the on-board equipment and between the main board and the external equipment are managed through the two-way communication driving program, so that the dual-equipment is started.
Optionally, during the handshake process, the communication parameters are dynamically adjusted to adapt to the characteristics of different devices, and the communication rate and the buffer size are automatically adjusted according to the response time and the data transmission capability of the devices.
Optionally, step S40 includes:
and step S41, sending a restarting instruction to the power control unit of the main board through the embedded controller, and controlling the main board to restart in the two-way communication mode.
The embedded controller sends a restarting instruction to the power control unit of the main board, so that the main board is restarted in a two-way communication mode, the system can be ensured to normally operate according to the new communication mode, restarting preparation after system configuration change is completed, and the system can be started in the two-way communication mode after restarting.
It should be noted that the power control unit is a component on the motherboard responsible for managing power distribution and control of the entire motherboard.
The power control unit restarts the main board according to a preset power-on sequence after receiving the restart instruction sent by the embedded controller, sequentially provides power for each component on the main board, monitors the power-on state of each component and ensures normal starting. And after the main board power supply is restarted, carrying out initialization configuration according to the switched two-way communication mode.
Step S42, based on the two-way communication mode, completing communication handshake with the on-board device and the external device sequentially according to a predefined sequence.
It should be noted that, the predefined order refers to an order of handshaking with the device according to the type, importance, connection position, and other factors of the device during system design.
Optionally, the order of the communication handshake with the on-board device and the external device is defined according to the hardware design document and the device priority. The handshake sequence of the on-board device is arranged before the external device.
After the device is started in the two-way communication mode, handshake request signals are sequentially sent to the on-board device and the external device according to a predefined sequence, the identity and the communication capacity of the device are verified according to response signals of the on-board device and the external device, and handshake is completed to enter a normal communication state.
And step S43, loading a two-way communication driving program in the basic input and output system, and distributing independent communication channels and interrupt resources for the on-board equipment and the external equipment.
It should be noted that, the interrupt resource is a mechanism for notifying the cpu that there is an external event to be handled, and is an independent interrupt request line allocated to each device, and when the device generates an event, an interrupt signal is sent to the cpu through the interrupt request line, and the cpu responds to the interrupt and executes a corresponding interrupt handler.
The method comprises the steps of loading a two-way communication driving program according to equipment information of the on-board equipment and the external equipment and resource information of a basic input/output system, distributing independent communication channels for the on-board equipment and the external equipment according to equipment types, communication requirements and system resource conditions based on the two-way communication driving program, and distributing independent interrupt resources for each equipment through an interrupt management interface.
Optionally, in the starting process of the basic input/output system, a communication channel and interrupt resources are reserved for the on-board device and the external device according to the hardware design information and the predefined device configuration.
And step S44, synchronously processing the data transmission requests of the on-board device and the external device through a polling mechanism or an event triggering mechanism so as to realize the startup of the dual-device.
It should be noted that the polling mechanism is to check whether the on-board device and the external device have data transmission requests sequentially according to a certain time interval, if so, immediately process the data transmission requests, and if not, continuously check the next device, and thus, cycle. The event triggering mechanism is that when the equipment has a data transmission request, the equipment sends an event notification to the main board in an interrupt mode, and the main board responds to the event notification and processes the data transmission request.
As an optional implementation manner, under a polling mechanism, data transmission requests of the on-board device and the external device are checked in sequence according to a preset polling period and sequence, and are processed. After the processing is completed, the next round of polling is continued, and the efficient cooperative work of the two devices is realized.
As another alternative implementation mode, under the event triggering mechanism, when the on-board device and the external device have data transmission requests, the interrupt request line sends an interrupt signal to the central processing unit, and the central processing unit calls a corresponding interrupt processing program to process the data transmission requests after responding to the interrupt. After the interrupt processing program finishes processing the data transmission request, executing an interrupt return instruction to enable the central processing unit to recover to a state before interrupt, and continuously executing a normal program flow to complete a double-device startup flow and realize double-device startup.
Optionally, different priorities are set for the data transmission requests of the on-board device and the external device according to the task importance and the emergency degree of the device. When the request is processed, scheduling is performed according to the priority order, so that the key tasks can be timely processed.
The embodiment provides a dynamic expansion control method of a main board interface device, which simplifies communication configuration and management during starting by starting in a single-way communication mode, ensures that a system can quickly and stably complete a starting process, and avoids starting failure or unstable system caused by mismatching of communication modes or device conflict. By detecting the connection condition of external equipment on the communication interface in real time, whether the communication mode needs to be switched is determined, and the adaptability of the system to different equipment configurations is improved. The dynamic adjustment of the communication mode is realized through the soft jumper area rewriting function, and the flexibility of the control system is improved. Through loading double-circuit communication drive for the mainboard can support the collaborative work of on-board equipment and external equipment simultaneously, adapts to the change of external equipment, and improves data transmission efficiency.
Based on the first embodiment, a second embodiment of the present application provides a dynamic expansion control method for a motherboard interface device, referring to fig. 2, step S20 further includes:
And step A10, if the external equipment is detected to exist on the communication interface, sending a handshake signal to the communication interface through the universal input/output pin.
When the external equipment is detected to exist on the ESPI communication interface, the connection is actively established with the external equipment, equipment information is acquired, and preparation is made for subsequent equipment identification and communication.
It should be noted that, the handshake signal is generated based on the ESPI protocol specification, and is a signal for handshake communication with the ESPI device, and an electrical signal composed of a series of pulses with specific timing and level changes, and by sending the handshake signal to the ESPI communication interface, an external ESPI device may be triggered to generate a response. The ESPI protocol specification specifies rules for the format, sequence, timing, etc. of device communications, including signal characteristics and judgment conditions during the handshake process.
As an alternative embodiment, after detecting that the device is connected, a universal input output pin control function is called, the universal input output pin is configured into an output mode, and an output level is set. Handshake signals are sent to the ESPI communication interface through the universal input output pins.
And step A20, receiving and analyzing a response signal returned by the external equipment to obtain the characteristics of the response signal.
And receiving and analyzing the response signal can verify whether the communication link between the main board and the external device is normally established or not, and determine the characteristics of the response signal so as to accurately identify the device type of the external device.
It should be noted that the characteristic of the response signal is representative characteristic information of the response signal, including timing, level change, data coding format, etc. of the signal, for determining whether the device conforms to the ESPI protocol.
As an alternative embodiment, the response signal is monitored in real time by polling the status of the general purpose input output pins. And analyzing the received response signal according to the ESPI communication protocol and the signal characteristic template to determine the characteristic of the response signal.
And step A30, judging the characteristics of the response signals according to the handshake success condition specified by the ESPI protocol specification to determine whether the external equipment is ESPI equipment.
And whether the external equipment accords with ESPI protocol specifications is confirmed through a handshake process, so that the main board can effectively communicate with compatible ESPI equipment, the phenomenon that the system cannot work normally or communication faults occur due to the fact that incompatible equipment is connected is avoided, and the stable operation of the system and the accuracy of data transmission are ensured.
It should be noted that the handshake success condition is a specific condition defined in the ESPI protocol, including a level change of a signal, a timing requirement, a data format, and the like, and indicates that the handshake is successful when a response signal returned by the external device satisfies the conditions.
As an alternative implementation manner, comparing the characteristic of the response signal obtained through analysis with the handshake success condition specified by the ESPI protocol specification one by one comprises checking whether the initial level of the signal meets the requirement, whether the pulse time sequence is matched, whether the data coding meets the format specified by the ESPI protocol, and the like.
And step A40, if the characteristics of the response signals meet the handshake success conditions, judging that the handshake with the external equipment is successful, namely the external equipment is ESPI equipment.
As an optional implementation manner, if all comparison items of the handshake success conditions meet the handshake success conditions specified by the ESPI protocol, the handshake with the external device is judged to be successful, namely the external device is considered as the ESPI device.
The embodiment provides a dynamic expansion control method of a motherboard interface device, which comprises the steps of firstly identifying the type of an external device, quickly judging the compatibility of the external device when the device is accessed, ensuring that communication is established only with the compatible device, avoiding system faults or performance degradation caused by incompatibility of the device, and improving the stability of the system.
Based on the first embodiment, a third embodiment of the present application provides a dynamic expansion control method for a motherboard interface device, referring to fig. 3, after step S40, including:
And step S50, monitoring the real-time load conditions of the on-board equipment and the external equipment.
The load conditions of the on-board equipment and the external equipment are known in real time, a basis is provided for dynamically adjusting communication resources, and the efficient operation of the system is ensured.
The real-time load condition is indexes such as data transmission rate, processor utilization rate, memory occupancy rate and the like of the equipment in the running process, and reflects the current working strength of the equipment and the requirement on communication resources.
As an optional implementation mode, the running data of the on-board equipment is directly collected through the performance counters built in the main board and the on-board equipment chip, and parameters such as temperature, power consumption and the like are monitored through the sensors arranged at key parts of the on-board equipment, so that the load condition of the on-board equipment is comprehensively judged. The load condition acquisition mode of the external equipment is the same as that of the on-board equipment.
As another alternative implementation manner, based on the driver of the on-board device, the internal state information of the on-board device is obtained, and the load data of the on-board device is transferred to the system monitoring module through the driver interface. The load condition acquisition mode of the external equipment is the same as that of the on-board equipment.
And step S60, dynamically adjusting the communication bandwidths distributed to the on-board equipment and the external equipment according to the real-time load condition.
According to the actual load condition of the equipment, the communication bandwidth is reasonably distributed, so that the high-load equipment is ensured to obtain enough communication resources, meanwhile, the low-load equipment is prevented from occupying excessive bandwidth, and the communication efficiency is improved.
The communication bandwidth is the amount of data transmitted through the communication channel in a unit time, and determines the data transmission speed, and the larger the bandwidth, the more data is transmitted in a unit time.
As an alternative embodiment, a proportional-based algorithm is used to allocate bandwidth based on the proportion of the device load to the total load of the system.
For example, the load of the on-board device is 60% of the total load, and the external device is 40%, and the communication bandwidth of the on-board device is 60% and the communication bandwidth of the external device is 40% in proportion.
Optionally, weights are set for the on-board device and the external device, and initial bandwidths are allocated according to the weights. The initial bandwidth is adjusted according to the real-time load condition.
And step S70, managing access requests of the on-board equipment and the external equipment to the communication channel through a hardware interrupt controller, and determining the access right of the communication channel according to the equipment priority rule.
The importance of different devices and the emergency degree of tasks are different, and by setting the priority rule of the devices, the key devices can be ensured to obtain the access right of the communication channel preferentially, and key data can be transmitted timely, so that the task delay caused by channel occupation is avoided.
It should be noted that, the hardware interrupt controller is a component on the motherboard responsible for managing the interrupt request, receives the interrupt request signal sent by the device, processes the interrupt request according to a preset rule, and transmits the interrupt signal to the central processing unit. The communication channel is a path for data transmission between devices, and multiple devices can share the same communication channel, and need to coordinate access through a management mechanism. The device priority rule is used for determining the access right of the device to the communication channel according to a priority sequence predefined by the type, the use, the real-time load and other factors of the device.
As an optional implementation manner, the hardware interrupt controller receives interrupt requests of the on-board device and the external device, queues and arbitrates the interrupt requests according to the device priority rule, so that the device with high priority obtains the access right of the communication channel, and the high-priority device can timely transmit data.
Optionally, in the hardware interrupt controller, interrupt priorities are set for different devices through a configuration register, the interrupt priority of the on-board device for processing the real-time task is set to be the highest, and the external device sets different priorities according to the functional importance degree.
Optionally, an interrupt vector table is established, associating interrupt requests of different devices with corresponding interrupt handlers. When the hardware interrupt controller receives the interrupt request, the corresponding processing program is quickly positioned and executed according to the interrupt vector table.
The embodiment provides a dynamic expansion control method of a main board interface device, which firstly monitors the real-time load condition of the device and distributes communication bandwidth according to the actual load requirement of the device, so as to ensure that the high-load device can obtain more communication resources, thereby improving the data transmission rate. The hardware interrupt controller is used for managing and arbitrating the access requests of the equipment, so that the access of the equipment to the communication channel is orderly carried out, communication conflict and data loss are avoided, and the stability of the system is enhanced.
Based on the first embodiment, a third embodiment of the present application provides a method for controlling dynamic expansion of a motherboard interface device, referring to fig. 3, where the method for controlling dynamic expansion of a motherboard interface device further includes:
And step B10, if the hot plug event is detected, a control signal is sent to the corresponding communication interface, and the current communication link of the communication interface is frozen so as to prevent data loss or damage.
When a hot plug event occurs, the access of the new device or the unplugging of the old device may destabilize the state of the communication link. If the communication link is not frozen in time, the data being transmitted may be interrupted by abrupt interface state changes, resulting in data loss or corruption. By freezing the communication link, system errors due to hot plug can be prevented.
It should be noted that, the hot plug event is an operation event of directly inserting into the hardware device under the condition of not shutting down the system power supply in the running process of the system. 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 transmission of data. The communication link is a data transmission channel established between the motherboard and the device through the ESPI communication interface, and includes a physical connection and a logical connection.
As an alternative implementation manner, based on the hot plug detection pin of the communication interface chip, a hardware interrupt signal is generated when the device plug is detected. After receiving the interrupt signal, a control signal is sent to the ESPI communication interface through the hardware register, so that the ESPI communication interface enters a frozen state.
Optionally, the hot plug event further includes an operation event of directly pulling out the hardware device without turning off the system power during the system operation.
As another alternative embodiment of hot plug event detection, status registers of the communication interface are periodically polled to check whether a hot plug event has occurred.
And step B20, an independent buffer area is allocated for the new equipment accessed by the communication interface, and a corresponding driver program is dynamically updated based on the type of the new equipment.
And providing an independent memory space for newly accessed equipment for data buffering, ensuring the stability of data transmission, and dynamically updating a driver according to the type of the equipment to realize compatibility and functional support.
It should be noted that, the dedicated memory space allocated by the independent buffer area for the new device is used for temporarily storing data, so as to avoid data confusion and collision and ensure stability of data transmission.
Illustratively, when a new device access is detected, a contiguous block of memory space is allocated from the memory pool as an independent buffer for the new device. And searching the matched driver in the driver database by reading the identification information of the new equipment, loading the matched driver, and dynamically updating the driver list in the memory.
Alternatively, the size of the independent buffers is dynamically adjusted according to the type of device and the expected amount of data transfer.
Alternatively, the latest driver is downloaded and installed for a new device for which the driver database is not preloaded with the corresponding driver, by connecting to the driver provider's server via a network.
And step B30, switching the single-channel communication mode into a two-channel communication mode, triggering a rollback mechanism if the communication mode fails to switch, recovering to the single-channel communication mode, and notifying the user side of the reason of the failure of the mode switching.
After the hot plug event, the communication mode is switched from one-way to two-way to support the communication requirements of the new device. If the handover fails, a rollback mechanism is triggered to ensure stable operation of the system.
The rollback mechanism is a mechanism that restores the system state to the state before the operation when the system operation fails.
Illustratively, the single-way communication mode is switched to the two-way communication mode by sending a control command to the motherboard, modifying a register value of the motherboard. In the process of switching the communication modes, the execution condition of the switching operation is monitored in real time, and if the switching failure is judged according to a preset error judgment condition, a rollback mechanism is triggered, so that the configuration parameters of the communication interface are restored to the state of the single-path communication mode before switching. Recording the reason of the failure of the communication mode switching into a system log, and displaying corresponding error prompt information on an operation interface of a user side.
The embodiment provides a dynamic expansion control method of a motherboard interface device, which effectively prevents data loss or damage caused by hot plug operation by freezing a communication link and ensures data integrity. By allocating an independent buffer area for the new equipment, data transmission conflict is avoided, and the utilization rate of system resources is improved. By dynamically updating the driver, it is ensured that the new device is compatible with the motherboard. And when the communication mode is failed to switch, a rollback mechanism is triggered, so that the stable operation of the system is ensured, the user is informed of the reason of the failure of the mode switching in time, and the user can respond quickly and solve the problem conveniently.
For an example, to facilitate understanding of the implementation flow of the dynamic expansion control method of the motherboard interface device obtained by combining the first embodiment with the first embodiment, please refer to fig. 5, fig. 5 provides a schematic flow diagram of a dynamic expansion control method of the motherboard interface device, specifically:
based on a power button triggered by a user, the power management circuit receives a signal and starts to supply power to the main board, a starting circuit on the main board is activated, and the system initializes hardware equipment. In the process, the main board is started by default by taking the single-way communication mode as an initial mode, and enters a starting-up state.
Further, during the start-up process, all the m.2 slots on the motherboard are detected through predefined universal input/output pins, detection signals are sent to the m.2 slots, and a returned response signal is monitored to check whether a second ESPI (enhanced serial peripheral interface) device is connected to the motherboard through the m.2 slots.
If the second ESPI device is not detected, the operation is continued according to the preset routine starting flow, the hardware device driver on the main board is loaded in sequence, the system memory is initialized, the storage device is detected and configured, and finally the operating system is guided to start.
If the second ESPI device is detected, the routine starting flow is paused, the configuration stage is started, the setting information of the soft jumper area is read from the flash memory of the basic input/output system, the read soft jumper setting is compared with the configuration requirement of the dual-communication device one by one, and whether the condition of mismatch exists is checked to detect whether the soft jumper area is suitable for the dual-communication device.
If the soft jumper area is detected to be suitable for the double communication equipment, the operation is continued according to the conventional starting flow, and an operating system and other necessary driving programs are loaded, so that the system can be started normally and all connected communication equipment can be used.
When the soft jumper area is detected to be not suitable for the double-communication equipment, generating new soft jumper settings according to the configuration requirements of the double-communication equipment, and rewriting the soft jumper area through the basic input and output system to adapt to the double-communication equipment.
Further, according to the configuration and the current state of the system, the embedded controller controls the main board to enter a G3 state;
After entering the G3 state, the motherboard is restarted immediately and the device detection step is performed again to ensure that the soft jumper settings have been validated and that all communication devices are functioning properly.
It should be noted that the foregoing examples are only for understanding the present application, and do not constitute a limitation of the dynamic expansion control method of the motherboard interface device of the present application, and it is within the scope of the present application to make more simple changes based on the technical concept.
The application provides a dynamic expansion control device of a mainboard interface device, which comprises at least one processor and a memory in communication connection with 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 so that the at least one processor can execute the dynamic expansion control method of the mainboard interface device in the first embodiment.
Referring now to fig. 6, a schematic diagram of a dynamic expansion control device suitable for use in implementing the motherboard interface device of an embodiment of the present application is shown. The dynamic expansion control device of the motherboard interface device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, personal Digital Assistants (PDAs), personal digital assistants (Personal DIGITAL ASSISTANT), tablet computers (PADs, portable Application Description), and the like, and fixed terminals such as desktop computers and the like. The dynamic expansion control device of the motherboard interface device shown in fig. 6 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the dynamic expansion control device of the motherboard interface device may include a processing means 1001 (e.g., a central processor, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage means 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 by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, a system including an input device 1007 such as a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc., an output device 1008 including a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, a speaker, a vibrator, etc., a storage device 1003 including a magnetic tape, a hard disk, etc., and a communication device 1009 may be connected to the I/O interface 1006. The communication means 1009 may allow the dynamic expansion control device of the motherboard interface device to communicate with other devices wirelessly or by wire to exchange data. While the figures illustrate a dynamic expansion control device having a motherboard interface device of various systems, it should be understood that not all illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or installed from the storage device 1003, or installed from the read only memory 1002. The above-described functions defined in the method of the disclosed embodiment of the application are performed when the computer program is executed by the processing device 1001.
The dynamic expansion control device of the main board interface device provided by the application adopts the dynamic expansion control method of the main board interface device in the embodiment, and can solve the technical problem of how to dynamically adjust the communication mode of the main board to adapt to the change of external equipment. Compared with the prior art, the beneficial effects of the dynamic expansion control device of the motherboard interface device provided by the application are the same as those of the dynamic expansion control method of the motherboard interface device provided by the embodiment, and other technical features of the dynamic expansion control device of the motherboard interface device are the same as those disclosed in the method of the previous embodiment, and are not repeated herein.
It is to be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon for performing the dynamic expansion control method of the motherboard interface device in the above-described embodiments.
The computer readable storage medium provided by the present application may be, for example, a U disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM, random Access Memory), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (EPROM, erasable Programmable Read Only Memory, or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to electrical wiring, fiber optic cable, radio Frequency (RF), the like, or any suitable combination of the foregoing.
The computer readable storage medium may be included in the dynamic expansion control device of the motherboard interface device or may exist alone without being assembled into the dynamic expansion control device of the motherboard interface device.
The computer readable storage medium carries one or more programs which, when executed by the dynamic expansion control device of the motherboard interface device, cause the dynamic expansion control device of the motherboard interface device to write computer program code for performing the operations of the present application in one or more programming languages, including a conventional procedural programming language, such as the "C" language or similar programming languages, or combinations thereof. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN, local Area Network) or a wide area network (WAN, wide Area Network), or may be connected to an external computer (e.g., through the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations 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 diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present application may be implemented in software or in hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions (i.e. computer program) for executing the dynamic expansion control method of the main board interface device, so that the technical problem of how to dynamically adjust the communication mode of the main board to adapt to the change of external equipment can be solved. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the application are the same as those of the dynamic expansion control method of the motherboard interface device provided by the above embodiment, and are not described in detail herein.
The foregoing description is only a partial embodiment of the present application, and is not intended to limit the scope of the present application, and all the equivalent structural changes made by the description and the accompanying drawings under the technical concept of the present application, or the direct/indirect application in other related technical fields are included in the scope of the present application.

Claims (10)

1. The dynamic expansion control method of the main board interface device is characterized by comprising the following steps:
Responding to the starting operation of the main board, controlling the main board to start in a single-way communication mode as an initial mode, and completing handshake communication with on-board equipment, wherein the on-board equipment is fixedly arranged on the main board;
Detecting all communication interfaces on the main board through predefined general input/output pins to determine whether external equipment exists or not;
If the external equipment is detected to exist on the communication interface, accessing a soft jumper area through a flash memory management function of a basic input/output system, and reading and verifying the soft jumper area to ensure that the soft jumper area is in a writable state;
Generating configuration information for switching a communication mode from the single-path communication mode to the two-path communication mode, writing the configuration information into the soft jumper area so as to realize a soft jumper area rewriting function in the flash memory of the basic input/output system, switching the communication mode from the single-path communication mode to the two-path communication mode, and triggering a main board to be powered down to a preset state;
And controlling the main board to restart in the two-way communication mode, completing communication handshake with the on-board equipment and the external equipment in sequence, and loading two-way communication drive to realize double-equipment startup.
2. The method for dynamically expanding and controlling a motherboard interface device according to claim 1, wherein the step of controlling the motherboard to start in a single-pass communication mode as an initial mode in response to a motherboard start-up operation to complete handshake communication with an onboard device, the onboard device being fixedly provided on the motherboard comprises:
loading a pre-configured one-way communication driver from a basic input/output system in response to the starting operation of the main board;
initializing a register and interrupt setting of a communication interface based on the single-way communication driver, and controlling the main board to start in the single-way communication mode;
And in the single-way communication mode, sending a handshake request signal to the on-board equipment through the communication interface, and receiving a response signal of the on-board equipment to finish handshake communication.
3. The method for dynamically expanding control of a motherboard interface device according to claim 1, wherein the step of detecting all communication interfaces on the motherboard through predefined universal input output pins to determine whether an external device is present comprises:
judging whether the external equipment exists on the communication interface or not by reading the pin voltage of the universal input/output pin;
If the pin voltage jumps from a low level state to a high level state, determining that the external equipment exists;
And if the level state of the pin voltage is unchanged, judging that the external equipment does not exist.
4. The method for dynamically expanding and controlling a motherboard interface device according to claim 1, wherein the step of detecting all communication interfaces on the motherboard through predefined universal input/output pins to determine whether an external device exists, further comprises:
If the external equipment is detected to exist on the communication interface, sending a handshake signal to the communication interface through the universal input/output pin;
Receiving and analyzing a response signal returned by the external equipment to obtain the characteristics of the response signal;
judging the characteristics of the response signal according to a handshake success condition specified by ESPI protocol specification to determine whether the external equipment is ESPI equipment or not;
If the characteristics of the response signal meet the handshake success condition, the handshake with the external device is judged to be successful, namely the external device is ESPI device.
5. The method for dynamically expanding and controlling a motherboard interface device according to claim 1, wherein the step of triggering the motherboard to power down to a preset state comprises:
And sending a deep sleep power-off instruction to the main board through the register operation of the embedded controller or the south bridge chip so as to trigger the main board to be powered down to a preset state.
6. The method for dynamically expanding and controlling a motherboard interface device according to claim 1, wherein the step of controlling the motherboard to restart in the two-way communication mode, completing communication handshaking with the onboard device and the external device in sequence, and loading two-way communication drive to realize dual-device startup comprises:
sending a restarting instruction to a power control unit of the main board through the embedded controller, and controlling the main board to restart in the two-way communication mode;
based on the two-way communication mode, completing communication handshake with the on-board device and the external device in sequence according to a predefined sequence;
loading a two-way communication driving program in a basic input/output system, and distributing independent communication channels and interrupt resources for the on-board equipment and the external equipment;
And synchronously processing the data transmission requests of the on-board device and the external device through a polling mechanism or an event triggering mechanism so as to realize the startup of the dual-device.
7. The method for dynamically expanding and controlling a motherboard interface device according to claim 1, wherein the step of controlling the motherboard to restart in the two-way communication mode, sequentially completing communication handshake with the onboard device and the external device, and loading a two-way communication driver to realize dual-device startup comprises:
monitoring real-time load conditions of the on-board equipment and the external equipment;
Dynamically adjusting the communication bandwidth allocated to the on-board equipment and the external equipment according to the real-time load condition;
and managing access requests of the on-board device and the external device to the communication channel through a hardware interrupt controller, and determining the access right of the communication channel according to a device priority rule.
8. The dynamic expansion control method of a motherboard interface device according to claim 1, characterized in that the dynamic expansion control method of a motherboard interface device further comprises:
If a hot plug event is detected, a control signal is sent to a corresponding communication interface, and a current communication link of the communication interface is frozen to prevent data loss or damage;
an independent buffer zone is allocated for new equipment accessed by the communication interface, and a corresponding driver program is dynamically updated based on the type of the new equipment;
And switching the single-path communication mode into a two-path communication mode, triggering a rollback mechanism if the communication mode fails to switch, recovering to the single-path communication mode, and notifying the reason of the failure of the mode switching to the user side.
9. A dynamic expansion control device of a motherboard interface device, characterized in that the device comprises 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 of a motherboard interface device according to any of claims 1 to 8.
10. A storage medium, characterized in that the storage medium is a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the dynamic expansion control method of a motherboard interface device according to any one of claims 1 to 8.
CN202510765365.1A 2025-06-10 2025-06-10 Dynamic expansion control method, device and storage medium for motherboard interface device Active CN120277016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510765365.1A CN120277016B (en) 2025-06-10 2025-06-10 Dynamic expansion control method, device and storage medium for motherboard interface device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510765365.1A CN120277016B (en) 2025-06-10 2025-06-10 Dynamic expansion control method, device and storage medium for motherboard interface device

Publications (2)

Publication Number Publication Date
CN120277016A CN120277016A (en) 2025-07-08
CN120277016B true CN120277016B (en) 2025-09-05

Family

ID=96235434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510765365.1A Active CN120277016B (en) 2025-06-10 2025-06-10 Dynamic expansion control method, device and storage medium for motherboard interface device

Country Status (1)

Country Link
CN (1) CN120277016B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436857A (en) * 2017-07-31 2017-12-05 郑州云海信息技术有限公司 A kind of Enhanced SPI device and the method carried out data transmission using the device
CN117851106A (en) * 2024-01-22 2024-04-09 深圳市杰和科技发展有限公司 Mainboard hardware fault diagnosis circuit and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2092407B1 (en) * 2006-12-08 2013-01-23 Nokia Corporation Multiple connections to a single serial interface
TWI694336B (en) * 2018-05-24 2020-05-21 新唐科技股份有限公司 Bus system and detecting method thereof
CN111522766B (en) * 2020-04-27 2022-03-01 浙江大华技术股份有限公司 Communication system, method, device, equipment and storage medium thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436857A (en) * 2017-07-31 2017-12-05 郑州云海信息技术有限公司 A kind of Enhanced SPI device and the method carried out data transmission using the device
CN117851106A (en) * 2024-01-22 2024-04-09 深圳市杰和科技发展有限公司 Mainboard hardware fault diagnosis circuit and device

Also Published As

Publication number Publication date
CN120277016A (en) 2025-07-08

Similar Documents

Publication Publication Date Title
CN110073333B (en) Method and system for recovering logic in FPGA chip and FPGA device
CN100501679C (en) an electronic device
US8898517B2 (en) Handling a failed processor of a multiprocessor information handling system
CN103842968B (en) A kind of moving method of internal storage data, computing machine and device
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
CN102789305B (en) Postpone hang
CN103827834B (en) Method, computer and device for migrating memory data
US10572434B2 (en) Intelligent certificate discovery in physical and virtualized networks
US20100274986A1 (en) Control apparatus and control method therefor
US11860718B2 (en) Register reading method and apparatus, device, and medium
US20190057000A1 (en) Technologies for headless server manageability and autonomous logging
CN115951949A (en) Method, device and computing device for recovering configuration parameters of BIOS
WO2025026240A1 (en) Method and apparatus for generating fault locating information, electronic device, and storage medium
CN115729573A (en) Firmware upgrading method, device, chip and computer storage medium
CN119025171B (en) Method and device for starting server equipment
CN111913669A (en) SSD power-down speed improving method and device, computer equipment and storage medium
CN120277016B (en) Dynamic expansion control method, device and storage medium for motherboard interface device
US20130318310A1 (en) Processor processing method and processor system
US20140181496A1 (en) Method, Apparatus and Processor for Reading Bios
CN113419884A (en) Method, device, terminal and storage medium for preventing BMC (baseboard management controller) image file from being damaged
CN118626123A (en) A method and device for upgrading firmware of baseboard management controller
CN112948315A (en) Storage area sharing method, storage medium and electronic device
RU2600101C1 (en) Assembly control module and method of firmware updating for this control module
CN118269859A (en) Control method, controller, vehicle and medium for vehicle operating system
CN114721877B (en) A software fault-tolerant recovery method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant