Communication state detection method and device, equipment and medium
By loading channel configuration information and initializing virtual channels in the basic input and output system, obtaining status information, and determining abnormal virtual channels, the problem of positioning abnormal VGPIO communication between the host BIOS and CPLD is solved, and rapid diagnosis and problem solving are achieved.
Patent Information
- Application Number
- CN202411413817.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-10
AI Technical Summary
The VGPIO communication abnormality between the host BIOS and CPLD is difficult to locate, and it is difficult to clarify the location and reasons for the communication blocked.
By loading preset channel configuration information during the startup process of the basic input and output system, initializing the virtual channel, and obtaining the status information recorded by the host and target devices, determining the abnormal virtual channel, and determining the channel diagnostic recommendation information based on the number of abnormal virtual channels, so as to locate Communication exception.
It realizes the rapid positioning of VGPIO communication abnormalities between the host BIOS and CPLD, clarifying the location and reasons for communication obstruction, reducing debugging time and improving problem-solving efficiency.
Smart Images

Figure CN119292814A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a communication status detection method, device, equipment and medium. Background Art
[0002] Currently, the host BIOS (Basic Input Output System) and CPLD (Complex Programmable Logic Device) can communicate via VGPIO (Virtual General-purpose input / output). Since there are many VGPIOs between the two, when a problem occurs, it is necessary to check the VGPIO with the problem and locate the cause of the problem. VGPIO communication failures may be problems on the host side or on the CPLD side, and it is difficult to locate the location where the communication is blocked.
[0003] Therefore, how to locate the VGPIO communication anomaly between the host BIOS and the CPLD is a problem that those skilled in the art need to solve. Summary of the invention
[0004] In view of this, the purpose of this application is to provide a communication status detection method, device, equipment and medium to locate the VGPIO communication anomaly between the host BIOS and the CPLD. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a communication status detection method, which is applied to a basic input and output system, comprising:
[0006] During the startup of the basic input and output system, loading preset channel configuration information;
[0007] Initialize each virtual channel between the basic input and output system and the target device according to the channel configuration information;
[0008] After each virtual channel is initialized and the basic input / output system is started, first state information of each virtual channel recorded by the basic input / output system is obtained, and second state information of each virtual channel recorded by the target device is obtained;
[0009] Abnormal virtual channels whose first status information and second status information are inconsistent are determined, and corresponding channel diagnosis suggestion information is determined according to the number of the abnormal virtual channels.
[0010] Optionally, load preset channel configuration information, including:
[0011] Reading the channel configuration information from a complex programmable logic device;
[0012] Storing the read channel configuration information into the memory corresponding to the basic input and output system;
[0013] The channel configuration information is loaded based on the memory.
[0014] Optionally, before initializing each virtual channel between the basic input / output system and the target device according to the channel configuration information, the method further includes:
[0015] From the channel configuration information, the input and output states, default output states, interrupt modes, transmission rates, clocks, and data verification modes required to be configured for each virtual channel are obtained by parsing;
[0016] Use the configuration tool to configure the input and output status, default output status, interrupt mode, transmission rate, clock and data verification method for each virtual channel.
[0017] Optionally, it also includes:
[0018] If any virtual channel fails to be initialized, check whether the number of consecutive initializations of the virtual channel exceeds the preset number of retries;
[0019] If the number of consecutive initializations of the virtual channel does not exceed the preset number of retries, re-initialize the virtual channel;
[0020] When the number of consecutive initializations of the virtual channel exceeds the preset number of retries, the initialization operation of the virtual channel is terminated.
[0021] Optionally, obtaining first status information of each virtual channel recorded by the basic input and output system includes:
[0022] Determine first state information of each virtual channel according to information configured by each virtual channel;
[0023] Writing the first status information of each virtual channel into the channel register corresponding to each virtual channel;
[0024] The first status information of each virtual channel is obtained by reading from the channel register corresponding to each virtual channel.
[0025] Optionally, determining corresponding channel diagnosis suggestion information according to the number of abnormal virtual channels includes:
[0026] Detecting whether the number of the abnormal virtual channels exceeds a preset number threshold;
[0027] If the number of the abnormal virtual channels exceeds the preset number threshold, the fault level is determined to be the first fault level, and the corresponding channel diagnosis suggestion information is confirmed according to the first fault level, including: checking the initialization operation of the abnormal virtual channel from the basic input and output system end and the target device end respectively; checking the interface configuration of the abnormal virtual channel from the basic input and output system end and the target device end respectively; detecting the signal waveform and signal quality of the abnormal virtual channel;
[0028] If the number of the abnormal virtual channels does not exceed the preset number threshold, determining the fault level as the second fault level, and confirming the corresponding channel diagnosis suggestion information according to the second fault level includes: from the basic input and output system side, checking the channel register corresponding to the abnormal virtual channel; from the target device side, analyzing the register information in the channel register corresponding to the abnormal virtual channel and the configuration information of the target device for the abnormal virtual channel; the severity of the first fault level is greater than the severity of the second fault level;
[0029] The abnormal virtual channel and the corresponding channel diagnosis suggestion information are recorded in a preset format to obtain a target file.
[0030] Optionally, it also includes:
[0031] Transmitting the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information to a preset terminal;
[0032] The preset terminal is used to display the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information.
[0033] In a second aspect, the present application provides a communication status detection device, applied to a basic input and output system, comprising:
[0034] A loading module, used for loading preset channel configuration information during the startup process of the basic input and output system;
[0035] An initialization module, used for performing initialization operation on each virtual channel between the basic input and output system and the target device according to the channel configuration information;
[0036] an acquisition module, configured to acquire first status information of each virtual channel recorded by the basic input / output system and second status information of each virtual channel recorded by the target device after initialization of each virtual channel is completed and startup of the basic input / output system is completed;
[0037] The detection module is used to determine abnormal virtual channels whose first status information and second status information are inconsistent, and determine corresponding channel diagnosis suggestion information according to the number of the abnormal virtual channels.
[0038] Optionally, the loading module is specifically used to:
[0039] The channel configuration information is loaded from the memory corresponding to the basic input and output system.
[0040] Optionally, it also includes:
[0041] The configuration module is used to perform configuration operations on each virtual channel before initializing each virtual channel between the basic input and output system and the target device according to the channel configuration information.
[0042] Optionally, the initialization module is also used to:
[0043] If any virtual channel fails to be initialized, check whether the number of consecutive initializations of the virtual channel exceeds the preset number of retries;
[0044] If the number of consecutive initializations of the virtual channel does not exceed the preset number of retries, re-initialize the virtual channel;
[0045] When the number of consecutive initializations of the virtual channel exceeds the preset number of retries, the initialization operation of the virtual channel is terminated.
[0046] Optionally, the acquisition module is specifically used for:
[0047] The first status information of each virtual channel is obtained by reading from the channel register corresponding to each virtual channel.
[0048] Optionally, the detection module is specifically used for:
[0049] Detecting whether the number of the abnormal virtual channels exceeds a preset number threshold;
[0050] If the number of the abnormal virtual channels exceeds the preset number threshold, the corresponding channel diagnosis suggestion information includes: checking the initialization operation of the abnormal virtual channels from the basic input and output system end and the target device end respectively; checking the interface configuration of the abnormal virtual channels from the basic input and output system end and the target device end respectively; detecting the signal waveform and signal quality of the abnormal virtual channels;
[0051] If the number of the abnormal virtual channels does not exceed the preset number threshold, the corresponding channel diagnosis suggestion information includes: from the basic input and output system side, checking the channel register corresponding to the abnormal virtual channel; from the target device side, analyzing the register information in the channel register corresponding to the abnormal virtual channel and the configuration information of the target device for the abnormal virtual channel;
[0052] The abnormal virtual channel and the corresponding channel diagnosis suggestion information are recorded in a preset format to obtain a target file.
[0053] Optionally, it also includes:
[0054] The transmission module is used to transmit the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information to a preset terminal; and use the preset terminal to display the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information.
[0055] In a third aspect, the present application provides an electronic device, including:
[0056] Memory for storing computer programs;
[0057] The processor is used to execute the computer program to implement the communication status detection method disclosed above.
[0058] In a fourth aspect, the present application provides a non-volatile storage medium for storing a computer program, wherein the computer program implements the aforementioned disclosed communication status detection method when executed by a processor.
[0059] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned disclosed communication status detection method when executed by a processor.
[0060] It can be seen from the above scheme that the present application provides a communication status detection method, which is applied to a basic input and output system, including: during the startup process of the basic input and output system, loading preset channel configuration information; initializing each virtual channel between the basic input and output system and the target device according to the channel configuration information; after the initialization of each virtual channel is completed and the startup of the basic input and output system is completed, obtaining the first status information of each virtual channel recorded by the basic input and output system, and obtaining the second status information of each virtual channel recorded by the target device; determining abnormal virtual channels whose first status information and second status information are inconsistent, and determining corresponding channel diagnosis suggestion information according to the number of the abnormal virtual channels.
[0061] It can be seen that the present application utilizes the basic input and output system to compare the first state information of each virtual channel recorded locally by the host with the second state information of each virtual channel recorded by the target device, and then determines the abnormal virtual channels whose first state information and second state information are inconsistent, so as to determine the corresponding channel diagnosis suggestion information according to the number of abnormal virtual channels. Referring to this channel diagnosis suggestion information, it is convenient to locate the VGPIO communication anomaly between the host BIOS and the CPLD, which is helpful to clarify the location and cause of the communication obstruction.
[0062] Correspondingly, a communication status detection device, equipment and medium provided by the present application also have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0064] Figure 1 A flow chart of a communication status detection method disclosed in this application;
[0065] Figure 2 A schematic diagram of the connection between a host BIOS and a CPLD disclosed in this application;
[0066] Figure 3 A flow chart of another communication status detection method disclosed in this application;
[0067] Figure 4 A schematic diagram of a communication status detection device disclosed in this application;
[0068] Figure 5 A schematic diagram of an electronic device disclosed in this application;
[0069] Figure 6 A server structure diagram provided for this application;
[0070] Figure 7 A terminal structure diagram provided for this application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other examples obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] At present, the host BIOS and CPLD can perform VGPIO communication. Since there are a large number of VGPIOs between the two, when a problem occurs, it is necessary to troubleshoot the VGPIO with the problem and locate the cause of the problem. The VGPIO communication failure may be a problem on the host side or on the CPLD side, and it is difficult to locate the location where the communication is blocked. To this end, the present application provides a communication status detection scheme that helps to locate the VGPIO communication anomaly between the host BIOS and the CPLD.
[0073] See also Figure 1 As shown, the embodiment of the present application discloses a communication status detection method, which is applied to a basic input and output system, including:
[0074] S101 . During the startup of a basic input / output system, preset channel configuration information is loaded.
[0075] It should be noted that the preset channel configuration information is pre-stored in the host side, in a memory area for the basic input and output system to call. Therefore, in one embodiment, loading the preset channel configuration information includes: loading the channel configuration information from the memory corresponding to the basic input and output system; the channel configuration information includes: input and output configuration, default output state, interrupt configuration, interrupt mode, read input state, read output state, output state and ESPI (Enhanced Serial Peripheral Interface) clock. Specifically, read the channel configuration information from the complex programmable logic device; store the read channel configuration information into the memory corresponding to the basic input and output system; load the channel configuration information based on the memory.
[0076] S102 : Initialize each virtual channel between the basic input / output system and the target device according to the channel configuration information.
[0077] In one embodiment, before initializing each virtual channel between the basic input / output system and the target device according to the channel configuration information, it also includes: performing configuration operations on each virtual channel. Performing configuration operations on each virtual channel includes: the basic input / output system correctly configures the ESPI rate, CRC (Cyclic Redundancy Check) check, etc. for each virtual channel; at the same time, the CPLD end also performs the same configuration operations as the BIOS for each virtual channel, including setting the ESPI rate, CRC check, etc. The virtual channel is: VGPIO. The target device can be a CPLD or a BMC (Baseboard Management Controller). In an example, the input / output state, default output state, interrupt mode, transmission rate, clock, and data verification mode to be configured for each virtual channel can be parsed from the channel configuration information; the input / output state, default output state, interrupt mode, transmission rate, clock, and data verification mode are configured for each virtual channel using a configuration tool. The configuration tool can specifically be related management software for VGPIO.
[0078] In one embodiment, if any virtual channel fails to initialize, it is detected whether the number of consecutive initializations of the virtual channel exceeds the preset number of retries; if the number of consecutive initializations of the virtual channel does not exceed the preset number of retries, the virtual channel is reinitialized; if the number of consecutive initializations of the virtual channel exceeds the preset number of retries, the initialization operation of the virtual channel is terminated.
[0079] S103 . After each virtual channel is initialized and the basic input / output system is started, first state information of each virtual channel recorded by the basic input / output system is obtained, and second state information of each virtual channel recorded by the target device is obtained.
[0080] It should be noted that the first state information of each virtual channel recorded by the basic input and output system is generated based on the configuration operation of the basic input and output system on each virtual channel; and the second state information of each virtual channel recorded by the target device is generated based on the configuration operation of the target device on each virtual channel; therefore, if the basic input and output system and the target device perform the same configuration operation on the same virtual channel and the configuration is successful, the first state information and the second state information of the same virtual channel are consistent; on the contrary, the first state information and the second state information of the same virtual channel will be consistent. It can be seen that the first state information of each virtual channel can be determined according to the information configured by each virtual channel; the first state information of each virtual channel is written into the channel register corresponding to each virtual channel; and the first state information of each virtual channel is obtained by reading from the channel register corresponding to each virtual channel.
[0081] In one implementation, obtaining the first status information of each virtual channel recorded in the basic input / output system includes: reading the first status information of each virtual channel from a channel register corresponding to each virtual channel.
[0082] S104: Determine abnormal virtual channels whose first status information and second status information are inconsistent, and determine corresponding channel diagnosis suggestion information according to the number of abnormal virtual channels.
[0083] In this embodiment, the channel diagnosis suggestion information is prompt information, and the technician can diagnose and check the abnormal virtual channel with reference to the channel diagnosis suggestion information.
[0084] In one embodiment, the corresponding channel diagnosis suggestion information is determined according to the number of abnormal virtual channels, including: detecting whether the number of abnormal virtual channels exceeds a preset number threshold; if the number of abnormal virtual channels exceeds the preset number threshold, determining that the fault level is the first fault level, and confirming the corresponding channel diagnosis suggestion information according to the first fault level includes: checking the initialization operation of the abnormal virtual channel from the basic input / output system end and the target device end respectively; checking the interface configuration of the abnormal virtual channel from the basic input / output system end and the target device end respectively; detecting the signal waveform and signal quality of the abnormal virtual channel; if the number of abnormal virtual channels does not exceed the preset number threshold, determining that the fault level is the second fault level, and confirming the corresponding channel diagnosis suggestion information according to the second fault level includes: checking the channel register corresponding to the abnormal virtual channel from the basic input / output system end; analyzing the register information in the channel register corresponding to the abnormal virtual channel and the configuration information of the target device for the abnormal virtual channel from the target device end; recording the abnormal virtual channel and the corresponding channel diagnosis suggestion information according to the preset format to obtain the target file. For example: recording the abnormal virtual channel and the corresponding channel diagnosis suggestion information to a predefined table file. The severity of the first fault level is greater than the severity of the second fault level.
[0085] In one embodiment, the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information are transmitted to a preset terminal; the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information are displayed using the preset terminal. The basic input and output system of the host communicates with the preset terminal through a serial port.
[0086] It can be seen that this embodiment uses the basic input and output system to compare the first state information of each virtual channel recorded locally by the host with the second state information of each virtual channel recorded by the target device, and then determines the abnormal virtual channels whose first state information and second state information are inconsistent, so as to determine the corresponding channel diagnosis suggestion information according to the number of abnormal virtual channels. Referring to this channel diagnosis suggestion information, it is convenient to locate the VGPIO communication anomaly between the host BIOS and the CPLD, which is helpful to clarify the location and cause of the communication obstruction.
[0087] Since the CPLD in the server can communicate with the BIOS through VGPIO, this application can be applied to the BIOS of the server. VGPIO is part of the ESPI protocol. The host and CPLD can communicate with each other through ESPI, without adding additional hardware resources. In addition, PCIe bandwidth information, BIOS startup status, etc. can be communicated with the CPLD through VGPIO.
[0088] VGPIO refers to virtual GPIO, which is implemented by transmitting GPIO information through the ESPI virtual line channel. The physical GPIO has physical pins, but the VGPIO does not have physical pins. The host and the slave can transmit virtual GPIO information through ESPI without connecting physical pins.
[0089] More specifically, the Virtual Wire Channel is used to convert the status of the sideband pin and GPIO communicated through eSPI into inband messages. The SerialIRQ interrupt communicates through this channel in the form of inband messages. The Virtual Wire Packet begins with the Virtual Wire Count byte, and this count indicates the number of Virtual Wire groups communicated by this packet. Then follows a number of Virtual Wire Groups. Each Virtual Wire Group contains 2 bytes, called the Virtual Wire Index and Virtual Wire Data. In one packet, up to 64 Virtual Wire Groups can be sent. The number of Virtual Wire Groups in a VW Packet cannot exceed the Operation Maximum Virtual Wire count in the Capabilities and Configuration Register of Channel 1. This applies to both Master and Slave. The eSPI Slave must declare support for more than 8 Virtual Wire Groups in a single VW Packet. The Virtual Wire Index points to a predefined Virtual Wire. The format of the Virtual wiredata is related to the associated virtual wire index. This contains specific information about the set of virtual wire groups being communicated. Unused Virtual WireSlots within a specific Virtual Wire Index should remain in a reserved state. The initiator must drive the reserved area to 0 and the receiver must ignore the reserved area. The Virtual Wire Packet is not subject to flow control. As long as the VW Channel is open, the receiver must always be prepared to receive a Virtual Wire packet at any time. The length of the Virtual Wire Packet is (1+2*n) bytes, where n is the number of Virtual wire groups in the packet.VW Index 128-255 is used for GPIO and VGPIO communication. This application uses the virtualization channel of ESPI to communicate with CPLD, checks the status of VGPIO, and gives the inspection results, so that users can quickly locate the problem.
[0090] The CPLD system has a dedicated module to control VGPIO, and the HOST side also has a dedicated VGPIO control register. The HOST side needs to correctly configure the ESPI rate and correctly enable the CS1 device before it can communicate with the CPLD. The VGPIO control register will be mapped to an address space, and whoever accesses these address spaces will access the corresponding registers.
[0091] See also Figure 2 , the connection between CPLD and host is as follows Figure 2 Generally, there can be 64 VGPIOs between the host CPU and CPLD, each of which can be configured and controlled separately. Due to the large number, the BIOS and CPLD need to communicate in advance and set a table to compare the configurations of both parties. The table includes VGPIO input and output configuration, interrupt configuration, default state, etc., as shown in Table 1.
[0092] Table 1
[0093]
[0094] Both BIOS and CPLD need this table. CPLD can provide this table in advance, and then the BIOS can enter it into a memory range during the boot process. It can also provide registers for BIOS to access so that the BIOS can dynamically update this table to the memory range. During the boot process, the BIOS will check all VGPIOs on the host side that communicate with the CPLD, and then output the results to the reserved memory space.
[0095] See also Figure 3 The method steps for detecting the VGPIO communication status between BIOS and CPLD include:
[0096] Step 1: BIOS and CPLD communicate via ESPI.
[0097] BIOS enables CS1 signal and VGPIO function. The host side correctly configures ESPI rate through the configuration table. Meanwhile, the CPLD side must also match BIOS, including setting ESPI rate, CRC check, etc.
[0098] Step 2: During the boot process, BIOS initializes VGPIO through the GPIO list. If the initialization process is successfully configured, it proceeds to step 3, otherwise it retries. When the number of retries to initialize VGPIO exceeds the preset number, it is considered that VPGIO initialization has failed, and the VGPIO automatic detection action ends.
[0099] The GPIO list includes: input and output settings, interrupt settings, default value settings, etc. The BIOS boot process loads the configuration table from the memory, and the content of VGPIO initialization is the content listed in the list.
[0100] Step 3: After the BIOS successfully initializes VGPIO, it will apply for a certain amount of memory space. It will not immediately record the current status to this memory area, but will wait until the beginning of the boot process and directly obtain the VGPIO status through the host's VGPIO register.
[0101] The VGPIO status includes: input-output relationship and signal. The register records the lowest level status, so what is obtained through the register is the actual configuration and current status of the final VGPIO, and the status set by the function is not necessarily the final result. The obtained VGPIO status is filled into the memory area in the form of a table according to the pre-agreed table.
[0102] Step 4: BIOS obtains VGPIO status from CPLD.
[0103] BIOS provides a Setup interface to input static VGPIO status to CPLD, or CPLD can provide registers so that BIOS can access the registers through interfaces such as I2C. In either case, the CPLD's VGPIO settings need to be correctly obtained.
[0104] Step 5: Start comparative analysis.
[0105] For example, for VGPIO-68, the BIOS setting is input, and the CPLD setting is output. If the output state provided by the CPLD is High, and the state obtained by the BIOS from the register is also High, then the two sides are consistent and the match passes. If they are inconsistent, an exception is recorded.
[0106] Step 6: Output all abnormal results and give diagnostic suggestions.
[0107] Case 1: If most VGPIO states are abnormal, the following suggestions are output:
[0108] (1) Consider whether the VGPIO initialization on both the BIOS and CPLD sides is configured correctly;
[0109] (2) BIOS detects ESPI settings;
[0110] (3) CPLD detects the ESPI settings and checks the VGPIO input and output logic;
[0111] (4) Hardware measures the ESPI signal waveform to confirm the signal quality.
[0112] Case 2: If a few VGPIOs are abnormal, the following suggestions are output:
[0113] (1) Check whether the BIOS register settings are correct for abnormal VGPIO;
[0114] (2) If the BIOS register settings are correct, it is recommended that the CPLD perform the analysis and processing.
[0115] Step 7: The comparison results and diagnostic data will be output to the serial terminal. Users can collect serial logs to obtain results and allow R&D personnel in related fields to quickly analyze according to diagnostic suggestions. It can be seen that when the VGPIO status is abnormal, relevant information will be printed to the serial terminal.
[0116] In this example, the relevant results can also be uploaded to the cloud for further diagnosis and analysis, or a cloud-based diagnosis engine can be established to achieve accurate diagnosis through large amounts of data training.
[0117] It can be seen that in this embodiment, the host side can directly read the VGPIO register configuration status and then save it in the memory area, and can obtain the actual VGPIO status set from the CPLD side, and compare and analyze the two data after obtaining them, and give relevant inspection suggestions for the difference items, thereby automatically checking the VGPIO settings between the BIOS and the CPLD, reducing unnecessary debugging time. This method is not limited to BIOS and CPLD, but also applies to the VGPIO status check between the BIOS and the BMC. There is also VGPIO communication between the BIOS and the BMC. Extending this method to the BMC field can achieve the same effect.
[0118] Accordingly, this embodiment can solve the problem that when CPLD and BIOS have problems in transmitting information (including PCIe bandwidth information, board ID information, etc.) using VGPIO, a configuration comparison list is generated according to the register setting and the configuration of CPLD. The two sides will compare and quickly locate which VGPIO communications have abnormalities, check the VGPIO configuration errors or logic errors at both ends, reduce the debugging time, and thus greatly improve the efficiency of solving this problem.
[0119] A communication status detection device provided in an embodiment of the present application is introduced below. The communication status detection device described below can be referenced to other embodiments described in this document.
[0120] See also Figure 4 As shown, the embodiment of the present application discloses a communication status detection device, which is applied to a basic input and output system, including:
[0121] The loading module 401 is used to load preset channel configuration information during the basic input and output system startup process;
[0122] Initialization module 402, used for initializing each virtual channel between the basic input and output system and the target device according to the channel configuration information;
[0123] The acquisition module 403 is used to acquire the first state information of each virtual channel recorded by the basic input and output system and acquire the second state information of each virtual channel recorded by the target device after each virtual channel is initialized and the basic input and output system is started;
[0124] The detection module 404 is used to determine the abnormal virtual channels whose first status information and second status information are inconsistent, and determine corresponding channel diagnosis suggestion information according to the number of abnormal virtual channels.
[0125] In one embodiment, the loading module is specifically used for:
[0126] Reading the channel configuration information from a complex programmable logic device;
[0127] Storing the read channel configuration information into the memory corresponding to the basic input and output system;
[0128] The channel configuration information is loaded based on the memory.
[0129] In one embodiment, it further includes:
[0130] The configuration module is used for parsing the channel configuration information to obtain the input and output status, default output status, interrupt mode, transmission rate, clock and data verification mode required to be configured for each virtual channel before initializing each virtual channel between the basic input and output system and the target device according to the channel configuration information; and configuring the input and output status, default output status, interrupt mode, transmission rate, clock and data verification mode for each virtual channel using a configuration tool.
[0131] In one embodiment, the initialization module is further used to:
[0132] If any virtual channel fails to be initialized, check whether the number of consecutive initializations of the virtual channel exceeds the preset number of retries;
[0133] When the number of consecutive initializations of the virtual channel does not exceed the preset number of retries, re-initialize the virtual channel;
[0134] When the number of consecutive initializations of the virtual channel exceeds the preset number of retries, the initialization operation of the virtual channel is terminated.
[0135] In one implementation, the acquisition module is specifically used to:
[0136] Determine first state information of each virtual channel according to information configured by each virtual channel;
[0137] Writing the first status information of each virtual channel into the channel register corresponding to each virtual channel;
[0138] The first status information of each virtual channel is obtained by reading from the channel register corresponding to each virtual channel.
[0139] In one embodiment, the detection module is specifically used for:
[0140] Detect whether the number of abnormal virtual channels exceeds a preset number threshold;
[0141] If the number of abnormal virtual channels exceeds a preset number threshold, the corresponding channel diagnosis suggestion information includes: checking the initialization operation of the abnormal virtual channels from the basic input and output system side and the target device side respectively; checking the interface configuration of the abnormal virtual channels from the basic input and output system side and the target device side respectively; detecting the signal waveform and signal quality of the abnormal virtual channels;
[0142] If the number of abnormal virtual channels does not exceed the preset number threshold, the corresponding channel diagnosis suggestion information includes: from the basic input and output system side, checking the channel registers corresponding to the abnormal virtual channels; from the target device side, analyzing the register information in the channel registers corresponding to the abnormal virtual channels and the configuration information of the target device for the abnormal virtual channels.
[0143] In one embodiment, it further includes:
[0144] The transmission module is used to transmit the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information to the preset terminal; and use the preset terminal to display the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information.
[0145] Among them, for more specific working processes of each module and unit in this embodiment, reference can be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0146] It can be seen that this embodiment provides a communication status detection device, which can compare the first status information of each virtual channel recorded locally by the host and the second status information of each virtual channel recorded by the target device, and then determine the abnormal virtual channels whose first status information and second status information are inconsistent, so as to determine the corresponding channel diagnosis suggestion information according to the number of abnormal virtual channels. Referring to this channel diagnosis suggestion information, it is convenient to locate the VGPIO communication anomaly between the host BIOS and the CPLD, which is conducive to clarifying the location and cause of the communication obstruction.
[0147] An electronic device provided in an embodiment of the present application is introduced below. The electronic device described below can be referenced to other embodiments described in this document.
[0148] See also Figure 5 As shown, the embodiment of the present application discloses an electronic device, including:
[0149] Memory 501, used for storing computer programs;
[0150] The processor 502 is used to execute the computer program to implement the method disclosed in any of the above embodiments.
[0151] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: during the startup of the basic input and output system, preset channel configuration information is loaded; each virtual channel between the basic input and output system and the target device is initialized according to the channel configuration information; after each virtual channel is initialized and the basic input and output system is started, first state information of each virtual channel recorded by the basic input and output system is obtained, and second state information of each virtual channel recorded by the target device is obtained; abnormal virtual channels whose first state information and second state information are inconsistent are determined, and corresponding channel diagnosis suggestion information is determined according to the number of abnormal virtual channels.
[0152] In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: loading channel configuration information from the memory corresponding to the basic input and output system.
[0153] In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: performing a configuration operation on each virtual channel.
[0154] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: if any virtual channel fails to initialize, whether the number of consecutive initializations of the virtual channel exceeds the preset number of retries is detected; if the number of consecutive initializations of the virtual channel does not exceed the preset number of retries, the virtual channel is re-initialized; if the number of consecutive initializations of the virtual channel exceeds the preset number of retries, the initialization operation of the virtual channel is terminated.
[0155] In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: first status information of each virtual channel is obtained by reading from a channel register corresponding to each virtual channel.
[0156] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: detecting whether the number of abnormal virtual channels exceeds a preset number threshold; if the number of abnormal virtual channels exceeds the preset number threshold, the corresponding channel diagnosis suggestion information includes: checking the initialization operation of the abnormal virtual channel from the basic input and output system end and the target device end respectively; checking the interface configuration of the abnormal virtual channel from the basic input and output system end and the target device end respectively; detecting the signal waveform and signal quality of the abnormal virtual channel; if the number of abnormal virtual channels does not exceed the preset number threshold, the corresponding channel diagnosis suggestion information includes: checking the channel register corresponding to the abnormal virtual channel from the basic input and output system end; and analyzing the register information in the channel register corresponding to the abnormal virtual channel and the configuration information of the target device for the abnormal virtual channel from the target device end.
[0157] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: transmitting the channel identification information and corresponding channel diagnosis suggestion information of the abnormal virtual channel to a preset terminal; and displaying the channel identification information and corresponding channel diagnosis suggestion information of the abnormal virtual channel using the preset terminal.
[0158] Furthermore, the present application also provides an electronic device. The electronic device can be Figure 6 The server shown can also be Figure 7 Terminal shown. Figure 6 and Figure 7 All of them are structural diagrams of electronic devices according to an exemplary embodiment, and the contents in the diagrams cannot be regarded as any limitation on the scope of use of the present application.
[0159] Figure 6A schematic diagram of the structure of a server provided in an embodiment of the present application. The server may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input / output interface, and a communication bus. The memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the relevant steps in the communication status detection disclosed in any of the aforementioned embodiments.
[0160] In this embodiment, the power supply is used to provide working voltage for each hardware device on the server; the communication interface can create a data transmission channel between the server and external devices, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0161] In addition, the memory as a carrier for resource storage can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include operating system, computer programs and data, etc. The storage method can be temporary storage or permanent storage.
[0162] The operating system is used to manage and control the hardware devices and computer programs on the server to realize the operation and processing of the data in the memory by the processor, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the communication status detection method disclosed in any of the aforementioned embodiments, the computer program can further include computer programs that can be used to complete other specific tasks. In addition to data such as application update information, the data can also include data such as application developer information.
[0163] Figure 7 A schematic diagram of the structure of a terminal provided in an embodiment of the present application, the terminal may specifically include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer, etc.
[0164] Generally, the terminal in this embodiment includes: a processor and a memory.
[0165] Among them, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0166] The memory may include one or more computer non-volatile storage media, which may be non-transitory. The memory may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor, it can implement the relevant steps in the communication status detection method performed by the terminal side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, update information of the application.
[0167] In some embodiments, the terminal may also include a display screen, an input and output interface, a communication interface, a sensor, a power supply, and a communication bus.
[0168] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than those shown in the figure.
[0169] A non-volatile storage medium provided in an embodiment of the present application is introduced below. The non-volatile storage medium described below can be cross-referenced with other embodiments described herein.
[0170] A non-volatile storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the communication status detection method disclosed in the above embodiment. The non-volatile storage medium is a computer-readable non-volatile storage medium, which, as a carrier for resource storage, may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system, a computer program and data, etc., and the storage method may be temporary storage or permanent storage.
[0171] A computer program product provided in an embodiment of the present application is introduced below. The computer program product described below can be cross-referenced with other embodiments described in this document.
[0172] A computer program product includes a computer program / instruction, which implements the steps of the aforementioned communication status detection method when executed by a processor.
[0173] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0174] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of non-volatile storage medium known in the art.
[0175] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A communication status detection method, characterized in that: Applicable to basic input and output systems, including: During the startup of the basic input and output system, loading preset channel configuration information; Initialize each virtual channel between the basic input and output system and the target device according to the channel configuration information; After each virtual channel is initialized and the basic input / output system is started, first state information of each virtual channel recorded by the basic input / output system is obtained, and second state information of each virtual channel recorded by the target device is obtained; Abnormal virtual channels whose first status information and second status information are inconsistent are determined, and corresponding channel diagnosis suggestion information is determined according to the number of the abnormal virtual channels.
2. The method according to claim 1, characterized in that Load preset channel configuration information, including: Reading the channel configuration information from a complex programmable logic device; Storing the read channel configuration information into the memory corresponding to the basic input and output system; The channel configuration information is loaded based on the memory.
3. The method according to claim 1, characterized in that: Before initializing each virtual channel between the basic input and output system and the target device according to the channel configuration information, the method further includes: From the channel configuration information, the input and output states, default output states, interrupt modes, transmission rates, clocks, and data verification modes required to be configured for each virtual channel are obtained by parsing; Use the configuration tool to configure the input and output status, default output status, interrupt mode, transmission rate, clock and data verification method for each virtual channel.
4. The method according to claim 1, characterized in that: Also includes: If any virtual channel fails to be initialized, check whether the number of consecutive initializations of the virtual channel exceeds the preset number of retries; If the number of consecutive initializations of the virtual channel does not exceed the preset number of retries, re-initialize the virtual channel; When the number of consecutive initializations of the virtual channel exceeds the preset number of retries, the initialization operation of the virtual channel is terminated.
5. The method according to claim 1, characterized in that Acquiring first status information of each virtual channel recorded by the basic input and output system, including: Determine first state information of each virtual channel according to information configured by each virtual channel; Writing the first status information of each virtual channel into the channel register corresponding to each virtual channel; The first status information of each virtual channel is obtained by reading from the channel register corresponding to each virtual channel.
6. The method according to any one of claims 1 to 5, characterized in that: Determining corresponding channel diagnosis suggestion information according to the number of abnormal virtual channels includes: Detecting whether the number of the abnormal virtual channels exceeds a preset number threshold; If the number of the abnormal virtual channels exceeds the preset number threshold, the fault level is determined to be the first fault level, and the corresponding channel diagnosis suggestion information is confirmed according to the first fault level, including: checking the initialization operation of the abnormal virtual channel from the basic input and output system end and the target device end respectively; checking the interface configuration of the abnormal virtual channel from the basic input and output system end and the target device end respectively; detecting the signal waveform and signal quality of the abnormal virtual channel; If the number of the abnormal virtual channels does not exceed the preset number threshold, determining the fault level as the second fault level, and confirming the corresponding channel diagnosis suggestion information according to the second fault level includes: from the basic input and output system side, checking the channel register corresponding to the abnormal virtual channel; from the target device side, analyzing the register information in the channel register corresponding to the abnormal virtual channel and the configuration information of the target device for the abnormal virtual channel; the severity of the first fault level is greater than the severity of the second fault level; The abnormal virtual channel and the corresponding channel diagnosis suggestion information are recorded in a preset format to obtain a target file.
7. The method according to any one of claims 1 to 5, characterized in that: Also includes: Transmitting the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information to a preset terminal; The preset terminal is used to display the channel identification information of the abnormal virtual channel and the corresponding channel diagnosis suggestion information.
8. A communication status detection device, characterized in that: Applicable to basic input and output systems, including: A loading module, used for loading preset channel configuration information during the startup of the basic input and output system; An initialization module, used for performing initialization operation on each virtual channel between the basic input and output system and the target device according to the channel configuration information; an acquisition module, configured to acquire first status information of each virtual channel recorded by the basic input / output system and second status information of each virtual channel recorded by the target device after initialization of each virtual channel is completed and startup of the basic input / output system is completed; The detection module is used to determine abnormal virtual channels whose first status information and second status information are inconsistent, and determine corresponding channel diagnosis suggestion information according to the number of the abnormal virtual channels.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.