Data transmission control method and device, electronic equipment and storage medium

By reading the buffer status and obtaining service mark bit information during the data transmission of BIOS and BMC, generating an error message and restarting the BMC, the BIOS performance jitter problem caused by BMC restart is solved, and the stable data transmission of the system is achieved.

CN120371748APending Publication Date: 2025-07-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410108202.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

During the data transmission between BIOS and BMC, the BIOS repeatedly reads the buffer status during BMC restart, resulting in performance jitter.

Method used

The BIOS reads the buffer status in the KCS interface. If the transmission requirements are not met, the service mark bit information of the BMC is obtained, the error message is generated, and the BMC is restarted after the BMC key process cannot be executed, and the service mark bit information is set to invalid.

Benefits of technology

This avoids performance jitter of the BIOS during BMC restart, and pauses data transmission through error message to ensure system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371748A_ABST
    Figure CN120371748A_ABST
Patent Text Reader

Abstract

The invention relates to the computer technology, discloses a data transmission control method and device, electronic equipment and a storage medium, and can be applied to various scenes such as the cloud technology, artificial intelligence, intelligent traffic and auxiliary driving. Comprising the following steps: if a BIOS needs to carry out data transmission with a BMC, reading the state of a buffer area in a keyboard controller KCS interface; if the state of the buffer area does not meet the requirement for data transmission between the BIOS and the BMC, service flag bit information of the BMC is obtained, and the service flag bit information is used for indicating the state of an intelligent management platform interface IPMI service of the BMC; if the service flag bit information indicates that the state of the IPMI service is invalid, error prompt information is generated; wherein after the key process of the BMC cannot be executed, the BMC sets the service flag bit information to indicate that the state of the IPMI service is invalid, and then the BMC is restarted, so that the problem that the BIOS still repeatedly reads the state of a buffer area during the period that the IPMI service is unavailable due to the restarting of the BMC, and the performance of the BIOS is jittered can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technologies, and more particularly, to a method, apparatus, electronic device, and storage medium for controlling data transmission. Background Art

[0002] In an electronic device, a Baseboard Management Controller (BMC) is usually provided to monitor the hardware status of the electronic device through data transmission between it and the Basic Input Output System (BIOS) on the motherboard of the electronic device.

[0003] However, during the data transmission between the BIOS and the BMC, the BMC may restart. During the restart of the BMC, the BIOS will repeatedly read the status of the buffer multiple times to perform data transmission with the BMC, resulting in performance jitter of the BIOS. Summary of the Invention

[0004] In view of the above problems, embodiments of the present application propose a method, apparatus, electronic device, and storage medium for controlling data transmission to improve the above problems.

[0005] According to one aspect of the embodiments of the present application, there is provided a method for controlling data transmission, which is applied to the Basic Input Output System (BIOS) in an electronic device, and the electronic device further includes a Baseboard Management Controller (BMC); the method includes:

[0006] If the BIOS needs to perform data transmission with the BMC, read the status of the buffer in the Keyboard Controller Style (KCS) interface, where the buffer is an Input Buffer Full (IBF) or an Output Buffer Full (OBF), and the BIOS communicates with the BMC through the KCS interface;

[0007] If the status of the buffer does not meet the requirements for data transmission between the BIOS and the BMC, obtain the service flag bit information of the BMC, where the service flag bit information is used to indicate the status of the Intelligent Platform Management Interface (IPMI) service of the BMC;

[0008] If the service flag bit information indicates that the status of the IPMI service is invalid, generate an error prompt message; wherein, after a critical process of the BMC cannot be executed, the BMC sets the service flag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC.

[0009] According to one aspect of the embodiments of the present application, there is provided a device for controlling data transmission, which is applied to the Basic Input Output System (BIOS) in an electronic device, and the electronic device further includes a Baseboard Management Controller (BMC); the device includes:

[0010] A reading module, configured to read the status of the buffer in the keyboard controller KCS interface if the BIOS needs to transfer data with the BMC. The buffer is an input buffer IBF or an output buffer OBF, and the BIOS communicates with the BMC through the KCS interface;

[0011] An obtaining module, configured to obtain the service tag bit information of the BMC if the status of the buffer does not meet the requirements for data transfer between the BIOS and the BMC. The service tag bit information is used to indicate the status of the Intelligent Management Platform Interface IPMI service of the BMC;

[0012] A generating module, configured to generate an error prompt message if the service tag bit information indicates that the status of the IPMI service is invalid. Among them, after the critical process of the BMC fails to execute, the BMC sets the service tag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC.

[0013] Optionally, the data transfer control device further includes an execution module, configured to, if the service tag bit information indicates that the status of the IPMI service is valid and the number of times of reading the status of the buffer is less than a preset number of times, after delaying for a preset duration, return to execute the step of reading the status of the buffer in the keyboard controller KCS interface, and accumulate the number of readings by 1; if the service tag bit information indicates that the status of the IPMI service is valid and the number of times of reading the status of the buffer reaches the preset number of times, generate an error prompt message.

[0014] Optionally, a first General-Purpose Input / Output interface GPIO on the Central Processing Unit CPU where the BIOS is located in the electronic device is connected to a second GPIO on the BMC; the output of the second GPIO includes the service tag bit information; the obtaining module is further configured to obtain the service tag bit information from the second GPIO through the first GPIO.

[0015] Optionally, the electronic device further includes a Complex Programmable Logic Device CPLD. The Central Processing Unit CPU where the BIOS is located is connected to the CPLD, and the BMC is connected to the CPLD; the CPLD is used to store the service tag bit information; the obtaining module is further configured to obtain the service tag bit information from the CPLD.

[0016] Optionally, when the BIOS needs to send data to the BMC or the BIOS needs to receive data sent by the BMC, it is determined that the BIOS needs to perform data transmission with the BMC; the requirements for data transmission between the BIOS and the BMC include the requirement for the BIOS to send data to the BMC and the requirement for the BIOS to receive data sent by the BMC; the reading module is further configured to, if the BIOS needs to send data to the BMC, read the status of the IBF; if the BIOS needs to receive data sent by the BMC, read the status of the OBF; the obtaining module is further configured to, when the BIOS needs to send data to the BMC, if the status of the IBF does not meet the requirement for the BIOS to send data to the BMC, obtain the service tag bit information of the BMC; when the BIOS needs to receive data sent by the BMC, if the status of the OBF does not meet the requirement for the BIOS to receive data sent by the BMC, obtain the service tag bit information of the BMC.

[0017] Optionally, the control device for data transmission further includes a first data transmission module, and the first data transmission module is configured to, if the status of the IBF meets the requirement for the BIOS to send data to the BMC and the status of the KCS interface is in the write state, write the data to be sent into the KCS interface so that the BMC reads the data to be sent from the KCS interface.

[0018] Optionally, the control device for data transmission further includes a second data transmission module, and the second data transmission module is configured to, if the status of the OBF meets the requirement for the BIOS to receive data sent by the BMC and the status of the KCS interface is in the read state, read the data to be received from the KSC interface, where the data to be received is written into the KSC interface by the BMC.

[0019] According to one aspect of the embodiments of the present application, an electronic device is provided, including: a processor; a memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, a control method for data transmission is implemented.

[0020] According to one aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, a control method for data transmission is implemented.

[0021] According to one aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, and when the computer instructions are executed by the processor, a control method for data transmission is implemented.

[0022] In this application, the BIOS and the BMC communicate based on the Keyboard Controller KCS interface. If the BIOS needs to transfer data with the BMC, it reads the status of the Input Buffer IBF or Output Buffer OBF in the KCS interface. When the status of the buffer does not meet the requirements for data transfer between the BIOS and the BMC, it obtains the service flag bit information of the BMC. The service flag bit information is used to indicate the status of the Intelligent Management Platform Interface IPMI service of the BMC. If the service flag bit information indicates that the status of the IPMI service is invalid, an error prompt message is generated. After the critical process of the BMC fails to execute, the BMC sets the service flag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC. In this way, in the case where the BMC restart causes the BMC to be unable to provide the IPMI service, the BIOS can determine that the IPMI service of the BMC is unavailable based on the service flag bit information of the BMC, and pause data transfer with the BMC based on the error prompt message. Thus, it is possible to avoid the problem of performance jitter of the BIOS caused by the BIOS still repeatedly reading the status of the buffer during the period when the BMC restart causes the IPMI service to be unavailable. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0024] Figure 1 FIG. shows a schematic diagram of an exemplary electronic device to which the technical solution of the embodiment of the present application can be applied.

[0025] Figure 2 FIG. shows a schematic diagram of transmitting fault information between the BIOS and the BMC in an exemplary electronic device to which the technical solution of the embodiment of the present application can be applied.

[0026] Figure 3 FIG. is a flowchart of a control method for data transmission according to an embodiment of the present application.

[0027] Figure 4 FIG. is a schematic diagram of the detection process of a detection process according to an embodiment of the present application.

[0028] Figure 5 FIG. is a schematic diagram of the BMC restart process according to an embodiment of the present application.

[0029] Figure 6 FIG. is a schematic diagram of the structure of an electronic device according to another embodiment of the present application.

[0030] Figure 7 It is a schematic structural diagram of an electronic device shown according to another embodiment of the present application.

[0031] Figure 8 It is a flowchart showing the BIOS sending data to the BMC according to an embodiment of the present application.

[0032] Figure 9 It is a flowchart showing the BIOS receiving data sent by the BMC according to an embodiment of the present application.

[0033] Figure 10 It is a block diagram of a control device for data transmission shown according to an embodiment of the present application.

[0034] Figure 11 It shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Detailed implementation manners

[0035] Now, example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art.

[0036] In addition, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present application. However, those skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the present application.

[0037] The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0038] The flowcharts shown in the drawings are only exemplary illustrations, and do not necessarily include all the content and operations / steps, nor are they necessarily executed in the described order. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.

[0039] It should be noted that: "multiple" as mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0040] The following explains the terms related to this application.

[0041] BIOS (Basic Input Output System), is a non-tamperable boot program engraved on the motherboard ROM chip. BIOS is responsible for the system self-check program (POST, Power On Self Test) and the system self-boot program. Therefore, it is the first program after the computer system starts and can be run by the central processing unit in the electronic device. Due to its non-tamperability, the program is stored in the ROM chip of the computing device and can still maintain the original settings after power-off.

[0042] BMC (Base-Board Management Controller) is a small operating system independent of the electronic device system. It can be run by the baseboard management controller, which can be inserted into the motherboard in the form of PCIE (PCI-Express bus), etc. Its external manifestation is just a standard RJ45 network port with a firmware system with an independent IP. BMC is mainly used to collect various information on a single electronic device and provide it to the upper-level operation and maintenance network management software. For example, when BMC detects a fault, it can report to the server of the upper-level network management software through means such as SNMP trap messages and SMTP email messages, so that the operation and maintenance personnel can identify and handle the fault in time. Generally, the messages reported by the BMC software will clearly indicate which component specifically caused the fault and what the handling suggestions are, etc.

[0043] IPMI (Intelligent Platform Management Interface) is an open standard hardware management interface specification that defines the standard for communication between embedded management systems. It can be used to monitor the physical health characteristics of electronic devices, such as temperature, voltage, fan working status, power status, etc. At the same time, IPMI is also responsible for recording information and log records of various hardware for prompting users and subsequent problem location. The core of IPMI is BMC, and the interaction between BMC and other components such as BIOS and CPU is all completed via IPMI, that is, the communication between BMC and other components (such as BIOS) in the electronic device is in accordance with the IPMI specification.

[0044] KCS (Keyboard Controller Style), that is, the keyboard controller mode interface, a serial interface based on the I / O port, used for the communication between the BMC and the CPU. Among them, the communication mode of KCS includes command transmission and response transmission. The command transmission is initiated by the CPU (that is, the CPU sends data to the BMC), and the response transmission is initiated by the BMC (that is, the BMC sends data to the CPU).

[0045] The inventors have found through research that in current electronic devices, the hardware status of the electronic device is monitored through the data transmission between the BMC and the BIOS. The BIOS and the BMC communicate based on the KCS interface. Therefore, before the BIOS and the BMC perform data transmission, it is necessary to read the status of the buffer in the KCS interface. Only when the status of the buffer meets the requirements for the BIOS and the BMC to perform data transmission, can the BIOS perform data transmission with the BMC. However, the BMC may restart. If the BIOS is performing data transmission with the BMC during the restart of the BMC, the status of the buffer cannot meet the requirements for the BIOS and the BMC to perform data transmission, and the BIOS will repeatedly read the status of the buffer until the preset number of times is reached or the status of the buffer meets the requirements for the BIOS and the BMC to perform data transmission, resulting in performance jitter of the BIOS system.

[0046] Based on this, the inventors provide a control method for data transmission, which is applied to the basic input / output system BIOS in an electronic device. The electronic device also includes a baseboard management controller BMC. The control method for data transmission includes: if the BIOS needs to perform data transmission with the BMC, read the status of the buffer in the keyboard controller KCS interface. The buffer is the input buffer IBF or the output buffer OBF, and the BIOS and the BMC communicate through the KCS interface; if the status of the buffer does not meet the requirements for the BIOS and the BMC to perform data transmission, obtain the service flag bit information of the BMC. The service flag bit information is used to indicate the status of the intelligent management platform interface IPMI service of the BMC; if the service flag bit information indicates that the status of the IPMI service is invalid, generate an error prompt message; among them, after the critical process of the BMC cannot be executed, the BMC sets the service flag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC, which can avoid the problem of performance jitter of the BIOS caused by the BIOS still repeatedly reading the status of the buffer during the period when the IPMI service is unavailable due to the restart of the BMC.

[0047] Figure 1 The structure diagram of an exemplary electronic device to which the embodiments of the present application can be applied is shown.

[0048] As Figure 1As shown in the figure, it is a schematic structural diagram of an electronic device 100. Among them, the electronic device 100 can be a server, a terminal, or a cloud product (public cloud and self-developed cloud).

[0049] The electronic device can be an independent physical server, a physical device in a server cluster or a distributed system, or a device that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The electronic device can be a terminal, including but not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Of course, the electronic device is not limited to those listed above.

[0050] A cloud product refers to a product based on cloud computing, including cloud servers, databases, cloud storage, etc. A public cloud usually refers to a cloud that can be used provided by a third-party provider for users. A public cloud can generally be used through the Internet and may be free or inexpensive. The core attribute of a public cloud is shared resource services. There are many instances of this kind of cloud that can provide services in today's entire open public network. The purpose of self-developed cloud is to use rich components and services on the cloud based on the R & D mode of the public cloud, put some excellent internal tools and components on the cloud, open them to the outside world, and provide services on the cloud.

[0051] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". The resources in the "cloud" seem to be infinitely expandable to users, and can be obtained at any time, used on demand, expanded at any time, and paid according to usage.

[0052] As a basic capability provider of cloud computing, a cloud computing resource pool (abbreviated as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose and use. The cloud computing resource pool mainly includes: computing devices (virtual machines containing operating systems), storage devices, and network devices.

[0053] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0054] The method of the present application can be applied to electronic devices that provide cloud computing resources, such as the virtualized computing devices and network devices listed above. In addition, the method of the present application can also be applied to electronic devices in intelligent transportation systems (ITS) and intelligent vehicle infrastructure cooperative systems (IVICS), such as vehicle-mounted devices, or servers that provide services for vehicles. Intelligent transportation systems, also known as intelligent transportation systems, are the effective and comprehensive application of advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) to transportation, service control and vehicle manufacturing, strengthening the connection between vehicles, roads and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment and saves energy.

[0055] The electronic device 100 includes a BIOS and a BMC, and the BMC is connected to a central processing unit (CPU) where the BIOS is located via an LPC (Low Pin Count Bus), such as a KCS interface, that is, the BMC communicates with the BIOS via the KCS interface.

[0056] In some embodiments, after a failure occurs in an electronic device, the failure is usually reported in a firmware first mode, such as Figure 2As shown, after a failure occurs, the system management interrupt (SMI) of the electronic device is triggered. The BIOS collects the failure information in the SMI code and sends it to the BMC through the KCS interface in the form of IPMI commands. At the same time, it is reported to the operating system (OS) through the APEI (ACPI (Advanced Configuration Power Interface) Platform Error Interface).

[0057] Among them, the failure of the electronic device can be a failure in the MAC (Machine-check Architecture) domain of the electronic device or a failure in the memory CE domain (Correctable Error Domain).

[0058] Taking the failure of the memory CE domain (Correctable Error Domain) as an example, after the memory CE domain exceeds the threshold, the SMI interrupt is triggered. The BIOS will read the retry_rd_err_log series of registers to obtain the failure information, such as node, channel, DIMM (Dual In-line Memory Module), rank (identical storage units), subrank (part of rank), bank (storage unit), device (hardware component), row (continuous storage units), column (column), address (location or identifier of the storage unit), error type, etc.

[0059] The above scenario is only an example and does not constitute a limitation on the application scenarios of the technical solutions provided by the embodiments of the present application. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, etc.

[0060] The implementation details of the technical solutions of the embodiments of the present application are elaborated in detail below:

[0061] Figure 3 The flowchart of the control method for data transmission according to an embodiment of the present application is shown. This method is applied to the basic input / output system BIOS in the electronic device, and the electronic device also includes a baseboard management controller BMC. Refer to Figure 3 As shown, this method at least includes steps 210 to 230, which are introduced in detail as follows:

[0062] S210. If the BIOS needs to transfer data with the BMC, read the status of the buffer in the keyboard controller KCS interface.

[0063] Among them, the buffer is the input buffer IBF or the output buffer OBF, and the BIOS communicates with the BMC through the KCS interface. There is a KCS interface in the electronic device, and the KCS interface includes a buffer. The buffer is a storage space with a specified size reserved in the memory to temporarily store the input / output (I / O) data, including the input buffer IBF (Input Buffer) and the output buffer OBF (Output Buffer). The states of both the IBF and the OBF are two types. One is the state indicating that the buffer is full, which can be represented by the high-level signal 1 at this time, and the other is the state indicating that the buffer is empty, which can be represented by the low-level signal 0 at this time.

[0064] The KCS interface defines multiple registers, namely the status register (Status), the command register (Command), the data input register (Data_In), and the data output register (Data_Out). The status register and the data output register are read-only (RO) registers, and the command register and the data input register are write-only (WO) registers. The IBF and the OBF are set in the status register (Status). The signals indicating the status of the IBF and the OBF are generally set by the BMC. If the BIOS wants to control the status of the KCS interface, it needs to send a control code to the KCS.

[0065] Among them, when the BIOS needs to send data to the BMC or the BIOS needs to receive data sent by the BMC, it is determined that the BIOS needs to transfer data with the BMC. Correspondingly, S210 includes: if the BIOS needs to send data to the BMC, read the status of the IBF; if the BIOS needs to receive data sent by the BMC, read the status of the OBF.

[0066] As described above, the BIOS needs to send data to the BMC. For example, the BIOS needs to report a fault message (such as an IPMI command) to the BMC; the data sent by the BMC to the BIOS, for example, after the BMC receives the fault message (such as an IPMI command) reported by the BIOS after a fault occurs in the electronic device, the response message returned to the BIOS.

[0067] S220. If the status of the buffer does not meet the requirements for data transfer between the BIOS and the BMC, obtain the service tag bit information of the BMC.

[0068] Among them, the service flag bit information is used to indicate the status of the Intelligent Management Platform Interface IPMI service of the BMC. As described above, the BIOS communicates with the BMC based on the IPMI service. Therefore, the status of the IPMI service in the BMC is closely related to whether data can be transmitted between the BIOS and the BMC.

[0069] It can be understood that the status of the buffer indicates whether the BIOS and the BMC can currently transmit data, while the status of the IPMI service indicates whether the BIOS and the BMC can transmit data within a certain period in the future.

[0070] In some embodiments, when the BIOS needs to send data to the BMC, if the status of the IBF is read as indicating that the IBF is full (indicating that data cannot be written to the command register or data input register in the KCS port at this time), it is determined that the status of the IBF does not meet the requirement for the BIOS to send data to the BMC; conversely, if the status of the IBF is read as indicating that the IBF is empty (indicating that data can be written to the command register or data input register in the KCS port at this time), it is determined that the status of the IBF meets the requirement for the BIOS to send data to the BMC.

[0071] In some embodiments, when the BIOS needs to receive data sent by the BMC, if the status of the IBF is read as indicating that the OBF is empty (indicating that the BMC has not written data to the KCS interface and data cannot be read from the command register or data input register in the KCS interface at this time), it is determined that the status of the OBF does not meet the requirement for the BIOS to receive data sent by the BMC; conversely, if the status of the OBF is read as indicating that the OBF is full (indicating that the MBC has written data to the KCS interface and data can be read from the command register or data input register in the KCS interface at this time), it is determined that the status of the OBF meets the requirement for the BIOS to receive data sent by the BMC.

[0072] S230: If the service flag bit information indicates that the status of the IPMI service is invalid, generate an error prompt message.

[0073] Among them, after the critical process of the BMC cannot be executed, the BMC sets the service flag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC.

[0074] The state of the IPMI service being invalid means that the IPMI service in the BMC is unavailable. As described above, the BMC communicates with the BIOS based on the IPMI service. Therefore, when the state of the IPMI service in the BMC is invalid, the BMC cannot communicate with the BIOS. Obviously, when the state of the buffer does not meet the requirements for data transmission between the BIOS and the BMC, if the IPMI service in the BMC is unavailable, even if the BIOS repeatedly reads the state of the buffer multiple times, it cannot guarantee data transmission between the BIOS and the BMC. Therefore, in this application, the BMC sets the service flag bit information of the BMC according to whether the IPMI service can be provided, and this service flag bit information is used as a reference for the BIOS to perform subsequent processing.

[0075] In this application, since the BMC determines that a restart is required (that is, it determines that the critical process in the BMC cannot be executed), and before restarting the BMC, the BMC sets the service flag bit information to indicate that the state of the IPMI service is invalid. In this way, during the process of restarting the BMC, the service flag bit information obtained by the BIOS indicates that the state of the IPMI service is invalid. In this way, the BIOS does not need to repeatedly read the state of the buffer multiple times according to the process in the related art.

[0076] The inability of the critical process to execute can be that the critical process exits passively, or the critical process enters an infinite loop state. The critical process in the BMC can refer to the process that executes the critical tasks in the BMC. There can be one or more critical processes in the BMC. When it is detected that at least one critical process in the BMC cannot be executed (the inability of the critical process to execute can also be called the critical process being hung), the BMC determines that a restart is required, and before restarting, sets the service flag bit information to indicate that the state of the IPMI service is invalid.

[0077] As Figure 4 shown, after the BMC starts up, a detection process runs in the BMC to detect whether there is a critical process in the BMC that cannot be executed. If there is, it is determined that the BMC needs to be restarted. Before restarting the BMC, the BMC sets the service flag bit information to indicate that the state of the IPMI service is invalid. Conversely, if it is determined that there is none, continue to detect the state of each critical process through the detection process.

[0078] As Figure 5 shown, when restarting the BMC, it is boot - restarted through the Universal Boot Loader (uboot). After the kernel of the OS starts up, if it is determined that the IMPI service of the BMC is available (that is, the BMC can provide the IPMI service), the BMC sets the service flag bit information to indicate that the state of the IPMI service is valid.

[0079] The error prompt message is used to indicate that data transmission between the BIOS and the BMC fails. Based on this error prompt message, the BIOS pauses data transmission with the BMC, that is, based on this error prompt message, the BIOS does not need to reread the status of the buffer in the KCS interface.

[0080] In this application, the BIOS and the BMC communicate based on the keyboard controller KCS interface. If the BIOS needs to transmit data to the BMC, it reads the status of the input buffer IBF or the output buffer OBF in the KCS interface. When the status of the buffer does not meet the requirements for data transmission between the BIOS and the BMC, it obtains the service flag bit information of the BMC. The service flag bit information is used to indicate the status of the Intelligent Management Platform Interface IPMI service of the BMC. If the service flag bit information indicates that the status of the IPMI service is invalid, an error prompt message is generated; after the critical process of the BMC fails to execute, the BMC sets the service flag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC. In this way, in the case where the BMC cannot provide the IPMI service due to restarting the BMC, the BIOS can determine that the IPMI service of the BMC is unavailable based on the service flag bit information of the BMC, and pause data transmission with the BMC based on the error prompt message. Thus, it is possible to avoid the problem of performance jitter of the BIOS caused by the BIOS still repeatedly reading the status of the buffer during the period when the IPMI service is unavailable due to restarting the BMC.

[0081] In one embodiment, after S220, the method further includes:

[0082] If the service flag bit information indicates that the status of the IPMI service is valid, and the number of times of reading the status of the buffer is less than the preset number of times, after delaying for a preset duration, return to execute the step of reading the status of the buffer in the keyboard controller KCS interface, and increment the number of times of reading by 1; if the service flag bit information indicates that the status of the IPMI service is valid, and the number of times of reading the status of the status register reaches the preset number of times, an error prompt message is generated.

[0083] Among them, as long as the IPMI service of the BMC is available, the BMC sets the service flag bit information to indicate that the status of the IPMI service is valid. The preset number of times is the maximum number of times to reread the status of the buffer set when the status of the buffer does not meet the requirements for data transmission between the BIOS and the BMC and the status of the IPMI service is valid. When the BIOS and the BMC perform data transmission, the data is transmitted byte by byte, and each byte of data transmission corresponds to a preset number of times. Generally, the preset number of times for OBF is the same as that for IBF.

[0084] It is worth mentioning that when the status of the IPMI service is valid, if the status of the buffer does not meet the requirements for data transmission between the BIOS and the BMC, a possible reason is that the previous data transmission between the BIOS and the BMC is in progress. For example, the data previously written by the BIOS into the input buffer has not been read by the BMC yet. The preset number of times can be set according to actual needs and will not be specifically limited here.

[0085] The preset duration refers to the interval duration between two adjacent readings when it is necessary to re-read the status of the buffer. The preset duration can be set according to actual needs and will not be specifically limited here.

[0086] In some embodiments, during the startup phase of the electronic device and the phase when the electronic device enters the System Management Mode (SMM), the preset number of times can be different. For example, the preset number of times set during the startup phase of the electronic device can be greater than the preset number of times set when the electronic device enters the SMM phase. For example, the preset number of times set in the former can be 50,000, and the preset number of times set in the latter can be 1,000. The preset duration can be, for example, 100 microseconds, etc. The specific preset duration and the specific preset number of times can both be set according to requirements.

[0087] SMM is an execution mode of the CPU. The system management mode can only be entered through the System Management Interrupt (SMI) and can only be exited by executing the Resume (RSM) instruction.

[0088] In some embodiments, during a data transmission process between the BIOS and the BMC in the startup phase and the SMM phase of the electronic device, each time the status of the buffer is read, the read count is incremented by 1. If the BIOS and the BMC complete a data transmission (for example, the BIOS writes the data to be sent into the input buffer and the BMC reads the data to be sent from the input buffer), the read count is cleared. In this way, during the subsequent data transmission process, the accumulation of the read count is restarted. Among them, the operation of incrementing the read count by 1 can be performed by an accumulator set in the CPU where the BIOS is located or set in the KCS interface.

[0089] Among them, the generated error prompt message can be output to the operation and maintenance personnel and / or the central processing unit. The error prompt message can be an error identifier, and each error identifier indicates a type of error. The error can be specifically located according to the error identifier, or it can be a literal representation of the error, such as the read count has reached the preset number of times, etc. Similarly, the BIOS suspends data transmission with the BMC based on this error prompt message, that is, based on this error prompt message, the BIOS does not need to re-read the status of the buffer in the KCS interface.

[0090] In this embodiment, when the service flag bit information indicates that the status of the IPMI service is valid, when re-reading the status of the buffer, the number of reads is considered. If the number of reads is less than the preset number, the status of the buffer is re-read after a preset delay to ensure the normal operation of the BIOS and avoid frequent reading of the status of the buffer.

[0091] In one embodiment, as Figure 5 shown, the first general-purpose input / output interface GPIO on the central processing unit CPU where the BIOS is located in the electronic device is connected to the second GPIO on the BMC; the output of the second GPIO includes service flag bit information; S210 includes: obtaining the service flag bit information from the second GPIO through the first GPIO.

[0092] Figure 6 is a schematic structural diagram of an electronic device shown according to another embodiment of the present application. Figure 5 Two CPUs in the electronic device are exemplarily shown, namely the first CPU and the second CPU. Of course, in other embodiments, there may be more CPUs in the electronic device.

[0093] Figure 6 In it, the first CPU is the CPU where the BIOS is located, the second CPU is another CPU, and the first CPU and the second CPU are interconnected through an xGMI (Socket / Inter-Chip Global Memory Interconnect) bus. Among them, the xGMI bus is used for CPU interconnection and supports memory sharing in heterogeneous computing architectures (such as between multiple CPUs, multiple graphics computing cards, and smart network cards).

[0094] In Figure 6 it, a first GPIO is provided on the first CPU, a second GPIO is provided on the BMC, and the first GPIO and the second GPIO are connected. Among them, GPIO is the general-purpose input / output interface (General-Purpose IO ports), which can be configured as an output mode to control external devices or as an input mode to read external signals. Here, the first GPIO is configured as an input mode to obtain service flag bit information from the second GPIO. The first GPIO is one GPIO selected from multiple GPIOs on the first CPU, and the selection basis can be the one closest to the BIOS and / or BMC, or the GPIO with a lower usage frequency in the first CPU, which can be specifically selected according to requirements.

[0095] The second GPIO can be configured in the output mode to obtain service tag bit information from the BMC and then transmit the service tag bit information to the first GPIO. That is to say, the output of the second GPIO is the input of the first GPIO. In some embodiments, a specified register in the BMC sets the level signal of the second GPIO according to the status of the IPMI service. The level signal of the second GPIO is regarded as service tag information. The second GPIO outputs the level signal of the second GPIO to the first GPIO so that the level signal of the first GPIO is set to be the same as the level signal of the second GPIO. The level signal of the first GPIO can indicate the service tag bit information.

[0096] In some embodiments, the BIOS can obtain the level signal of the first GPIO through the way of memory (Memory-Mapped I / O, MMIO) mapping. Among them, MMIO places the IO device in the memory space instead of the IO space. The BIOS can use the same instructions for reading and writing memory to complete the reading of the IO device. Here, the IO device is the first GPIO.

[0097] In some embodiments, when the BMC can provide the IPMI service, the level signal of the second GPIO is set to a high level signal, that is, 1. Correspondingly, the level signal of the first GPIO is 1. The status of the IPMI service is determined to be valid by the level signal of the first GPIO being 1.

[0098] When the IPMI service on the BMC is unavailable, the level signal of the second GPIO is set to a low level signal, that is, 0. Correspondingly, the level signal of the first GPIO is equal to 0. The status of the IPMI service is determined to be invalid by the level signal of the first GPIO being equal to 0.

[0099] In this embodiment, by designating a first GPIO in the CPU where the BIOS is located and connecting the first GPIO to the second GPIO in the BMC, the BIOS can obtain the service tag bit information from the second GPIO through the first GPIO, realizing the acquisition of the service tag bit information.

[0100] Figure 7 It is a schematic structural diagram of an electronic device shown according to another embodiment of the present application. In Figure 7 the electronic device further includes a complex programmable logic device CPLD. Figure 7 Two CPUs in the electronic device, the first CPU and the second CPU, are also exemplarily shown therein. Among them, the first CPU is the central processing unit CPU where the BIOS is located. The first CPU is connected to the CPLD, and the BMC is connected to the CPLD. The CPLD is used to store the service tag bit information. S210 includes: obtaining the service tag bit information from the CPLD.

[0101] Among them, CPLD (Complex Programming Logic Device) is a digital logic device developed on the basis of Programmable Logic Device (PLD). CPLD can replace discrete digital logic chips to implement various digital logic functions by writing hardware programs with specific logic.

[0102] In some embodiments, a dedicated register is reserved in the CPLD. The value of this dedicated register serves as service tag bit information, enabling the storage of service tag bit information in the CPLD and the retrieval of service tag bit information from the CPLD.

[0103] When the BMC can provide IPMI services, the value of the dedicated register in the CPLD can be set to 1 by sending a Power Management Bus (PMBus) command to the CPLD. Correspondingly, based on the obtained value of the dedicated register being 1, it is determined that the status of the IPMI service is valid.

[0104] When the IPMI service on the BMC is unavailable, the value of the dedicated register in the CPLD can be set to 0 by sending a Power Management Bus (PMBus) command to the CPLD. Correspondingly, based on the obtained value of the dedicated register being 0, it is determined that the status of the IPMI service is invalid.

[0105] In some embodiments, the BMC and the CPLD can be connected via an Inter-Integrated Circuit (I2C) bus. The two parties connected via the I2C bus adopt a master-slave mode. The master can read and write data, while the slave can only wait to be read and written. Here, the BMC can act as the master and can set the value of the dedicated register in the CPLD via the I2C bus according to whether the BMC can provide IPMI services, and the CPLD acts as the slave.

[0106] In some embodiments, the CPU and the CPLD can be connected via an Enhanced Serial Peripheral Interface (eSPI) bus. eSPI is a high-speed, full-duplex, synchronous, serial bus that can be used to connect processors, external memories, etc. It supports point-to-point and multi-master-slave structures, can perform error detection and correction through hardware, and supports secure boot and encrypted communication.

[0107] In some embodiments, when the BIOS needs to obtain service tag bit information, it can read the value of the dedicated register through the method of IO address mapping. The IO address is used to identify and access a specific location in an external device or memory. Through IO address mapping, the dedicated register can be mapped into the virtual address space, enabling the BIOS to access the dedicated register through the virtual address.

[0108] In this embodiment, the CPLD is connected to the BMC and the CPU where the BIOS is located. The CPLD is used to store service tag bit information, enabling the BIOS to obtain service tag bit information from the CPLD, thus achieving the acquisition of service tag bit information.

[0109] In some embodiments, if the BIOS needs to send data to the BMC, after reading the status of the IBF, it includes: if the status of the IBF meets the requirements for the BIOS to send data to the BMC and the status of the KCS interface is in the write state, write the data to be sent into the KCS interface so that the BMC can read the data to be sent from the KCS interface.

[0110] Among them, the data to be sent is generally an IPMI command. For example, get user access command (obtain user access command), etc. The standard data format of the IPMI command is shown in Table 1 below:

[0111] Table 1

[0112] Byte1 Byte2 Byte3: N NetFn / LUN Cmd Data

[0113] Among them, Byte is a byte, Byte1 represents the first byte, Byte2 represents the second byte, Byte3:N means that from the third byte to the last byte are all the data to be sent Data; NetFn is a field of the network function code, the purpose of which is to group IPMI commands functionally into command sets of sensors, events, chassis commands, and other commands, facilitating the organization and management of the distribution of command values. The NetFn value in Table 1 is an even number, indicating that the BIOS sends data to the BMC; LUN represents the sub-address of different LUNs after the same physical interface; Cmd is used to specify the operation to be performed under the specified network function; Data represents zero or more bytes of data, depending on the requirements of the IPMI command.

[0114] For example, Data can include the content shown in Table 2 below. Table 2 is as follows:

[0115] Table 2

[0116] Bytes Record Data 2 RecordId 1 RecordType 4 TimeStamp 2 GeneratorId 1 EvMRevision 1 SensorType 1 SensorNumber 1 EventDirType 1 OEMEvData1 1 OEMEvData2 1 OEMEvData3

[0117] Among them, the first column shows the number of bytes of each item in the second column. RecordId is the identifier of the record; RecordType is the type of the record, such as "event", "sensor data", etc.; TimeStamp is the timestamp of the record, indicating when the data was generated or recorded; GeneratorId is the identifier of the data generator, and the data generator may be a sensor or other device; EvMRevision (event message Revision) is the event message version number; SensorType is the type of the sensor, such as "temperature sensor", "pressure sensor", etc.; SensorNumber is the number or serial number of the sensor; EventDirType is the directory type or classification of the event, such as "forward event", "reverse event", etc.; OEMEvData1, OEMEvData2, and OEMEvData3 are bytes reserved for BIOS or BMC editing definitions, which can be used to explain the aforementioned custom data.

[0118] When the BIOS needs to send data to the BMC, the process of the BIOS sending data to the BMC is as Figure 8 shown.

[0119] S801. Read the status of the IBF.

[0120] S802. Determine whether the IBF is equal to 0.

[0121] If the IBF is not equal to 0, execute S803; if the IBF is equal to 0, execute S809.

[0122] In S802, according to the read status of the IBF, determine whether the IBF is equal to 0, that is, determine whether the requirement for the BIOS to send data to the BMC is met according to the read status of the IBF.

[0123] S803. Obtain the service tag bit information of the BMC.

[0124] S804. Determine whether the status of the IPMI service indicated by the service tag bit information is valid.

[0125] If the service tag bit information indicates that the status of the IPMI service is invalid, execute S805 to generate an error prompt message.

[0126] If the service tag bit information indicates that the status of the IPMI service is valid, execute S806 to determine whether the number of read times of the IBF status is less than the preset number of times.

[0127] If the number of read times of the IBF status is less than the preset number of times, execute S807 to delay the preset duration, and then return to execute S801.

[0128] If the number of times the status of IBF is read is not less than a preset number of times, execute S808 to generate an error prompt message.

[0129] S809. Clear OBF.

[0130] S810. Write the control code (WR_SYART) to the command register (WR_SYART instructs the BIOS to start writing data to the KCS interface).

[0131] S811. Wait for IBF = 0.

[0132] S812. Read the status of the KCS interface. The status of the KCS interface can be read from the status register of the KCS interface.

[0133] S813. Determine whether the status of the KCS interface is the write status. Only when the status of the KCS interface is the write status can the BIOS write the data to be sent to the KCS interface.

[0134] If the status of the KCS interface is not the write status, execute S814 to wait for OBF = 1. It should be noted that when the status of the KCS interface is not the write status, the current BIOS cannot write data to the KCS interface, that is, the BMC is inputting the data that the BIOS needs to receive to the KCS interface. Waiting for OBF = 1 means that after the BMC has written data to the KCS interface, it clears OBF.

[0135] If the status of the KCS interface is the write status, execute S815 to write one byte of the data to be sent to the data input register.

[0136] S816. Wait for IBF = 0.

[0137] S817. Read the status of the KCS interface.

[0138] S818. Determine whether the status of the KCS interface is the write status.

[0139] If the status of the KCS interface is not the write status, execute S819 to wait for OBF = 1.

[0140] If the status of the KCS interface is the write status, execute S820 to determine whether the data written is the penultimate byte of the data to be sent.

[0141] If the currently written data is not the penultimate byte of the data to be sent, return to execute S815 until the currently written data is the penultimate byte of the data to be sent.

[0142] If the currently written data is the second-to-last byte of the data to be sent, execute S821: Write the control code (WR_END) to the command register. WR_END indicates the end of data writing to the KCS interface by the BIOS.

[0143] S822: Read the status of the KCS interface.

[0144] S823: Determine whether the status of the KCS interface is the write status.

[0145] If the status of the KCS interface is the write status, execute S824: Write the data of the last byte of the data to be sent and end the writing.

[0146] If the status of the KCS interface is not the write status, execute S825: Wait for OBF = 1.

[0147] In this embodiment, when the BIOS needs to send data to the BMC, read the status of the IBF. If the status of the IBF does not meet the requirements for the BIOS to send data to the BMC, obtain the service tag bit information of the BMC. If the status of the OBF meets the requirements for the BIOS to receive data sent by the BMC and the status of the KCS interface is the read status, read the data to be received from the KSC interface. The data to be received is written to the KSC interface by the BMC, thus realizing the BIOS sending data to the BMC.

[0148] In some other embodiments, when the BIOS needs to receive data sent by the BMC, after reading the status of the OBF, the method further includes: if the status of the OBF meets the requirements for the BIOS to receive data sent by the BMC and the status of the KCS interface is the read status, read the data to be received from the KSC interface. The data to be received is written to the KSC interface by the BMC.

[0149] Among them, the data to be received is generally the data returned by the BMC in response to the IPMI command. The standard data format of the data to be sent is shown in Table 3 below:

[0150] Table 3

[0151] Byte1 Byte2 Byte3 Byte4: N NetFn / LUN Cmd Completion Code Data

[0152] Among them, the Completion Code is the completion code, indicating whether the IPMI command is successfully completed. Byte4:N means that from the fourth byte to the last byte are all the data to be received Data.

[0153] Note that after receiving an IPMI command, the BMC generates a System Event Log (SEL) to report the specific faulty memory location and error type, which can be reported to any object authorized to receive the SEL, such as the terminal of the operation and maintenance personnel, so that they can monitor and diagnose problems and take appropriate measures; the management platform, which collects, analyzes, and stores BMC logs and provides real-time alert and historical analysis functions; third-party service providers, which can provide additional log processing and analysis functions to help better manage electronic devices, etc.

[0154] When the BIOS needs to receive data sent by the BMC, the process of the BIOS receiving the data sent by the BMC is as Figure 9 shown.

[0155] When the BIOS needs to receive data sent by the BMC, first read the status of the IBF. If it is determined that IBF = 1, obtain the service tag bit information of the BMC. When the service tag bit information indicates that the status of the IPMI service is invalid, generate an error prompt message. When the service tag bit information indicates that the status of the IPMI service is valid, determine whether the number of times of reading the status of the IBF is less than the preset number of times. If the number of times of reading the status of the IBF is less than the preset number of times, delay for the preset duration and return to execute the step of reading the status of the IBF. If the number of times of reading the status of the IBF is not less than the preset number of times, generate an error prompt message.

[0156] If it is determined that IBF = 0, execute S901, read the status of the KCS interface.

[0157] S902, determine whether the status of the KCS interface is the write state.

[0158] If the status of the KCS interface is the write state, execute S903, clear the OBF. Note that when the status of the KCS interface is the write state, it means that the BIOS is writing data to the KCS interface. Clear the OBF, and after the BIOS writes the data, the BMC writes the data to be received to the KCS interface.

[0159] If the status of the KCS interface is not the write state, execute S904, determine whether the status of the KCS interface is the read state.

[0160] If the status of the KCS interface is the read state, execute S905, read the status of the OBF. Note that only when the status of the KCS interface is the read state can the BIOS read the data to be received from the KCS interface.

[0161] S906, determine whether OBF is equal to 1.

[0162] If OBF is not 1, execute S907 to obtain the service flag bit information of the BMC. If OBF = 1, execute S913.

[0163] S908. Determine whether the status of the IPMI service indicated by the service flag bit information is valid.

[0164] If the status of the IPMI service indicated by the service flag bit information is not valid, execute S909 to generate an error prompt message.

[0165] If the status of the IPMI service indicated by the service flag bit information is valid, execute S910 to determine whether the number of times of reading the status of OBF is less than the preset number of times.

[0166] If the number of times of reading the status of OBF is less than the preset number of times, execute S911 to delay for a preset duration; then return to execute S905.

[0167] If the number of times of reading the status of OBF is not less than the preset number of times, execute S912 to generate an error prompt message.

[0168] S913. Read one byte of data from the data output register.

[0169] S914. Write the read data to the data input register.

[0170] S915. Determine whether the length of the data written to the data input register is less than the preset length. Among them, the preset length can be, for example, 16 bytes, etc., and can be specifically set according to requirements.

[0171] If the length of the data written to the data input register is less than the preset length, return to execute S901.

[0172] If the length of the data written to the data input register is not less than the preset length, execute S916 to generate an error prompt message.

[0173] If the status of the KCS interface is not the read status, execute S917 to determine whether the KCS interface is in the idle state.

[0174] If the KCS interface is in the idle state, execute S918 to read the status of OBF.

[0175] S919. Determine whether OBF is equal to 1.

[0176] If OBF = 1, execute S920 to read the dummy data from the data output register. Among them, the dummy data is pre-set in the data output register, and reading the dummy data indicates the end of reading the data to be received.

[0177] If OBF is not 1, execute S921 to obtain the service flag bit information of the BMC.

[0178] S922. The service flag bit information indicates whether the status of the IPMI service is valid.

[0179] If the service flag bit information indicates that the status of the IPMI service is not valid, S923. Generate an error prompt message.

[0180] If the service flag bit information indicates that the status of the IPMI service is valid, S924. Determine whether the number of times of reading the status of OBF is less than the preset number of times.

[0181] If the number of times of reading the status of OBF is not less than the preset number of times, execute S925. Generate an error prompt message.

[0182] If the number of times of reading the status of OBF is less than the preset number of times, execute S926. Delay for the preset duration, and return to execute S918.

[0183] In this embodiment, when the BIOS needs to receive data sent by the BMC and reads the status of OBF, if the status of OBF does not meet the requirements for the BIOS to receive data sent by the BMC, obtain the service flag bit information of the BMC. If the status of OBF meets the requirements for the BIOS to receive data sent by the BMC and the status of the KCS interface is the read status, receive the data to be received from the KSC interface, and the data to be received is written into the KSC interface by the BMC, realizing that the BIOS receives data sent by the BMC.

[0184] The following introduces the device embodiment of the present application, which can be used to execute the method in the above embodiments of the present application. For the details not disclosed in the device embodiment of the present application, please refer to the above method embodiment of the present application.

[0185] Figure 10 is a block diagram of a data transmission control device shown according to an embodiment of the present application, as Figure 10 shown, applied to the basic input / output system BIOS in an electronic device, and the electronic device further includes a baseboard management controller BMC; the data transmission control device 400 includes:

[0186] A reading module 410, configured to read the status of the buffer in the keyboard controller KCS interface if the BIOS needs to perform data transmission with the BMC, where the buffer is an input buffer IBF or an output buffer OBF, and the BIOS communicates with the BMC through the KCS interface;

[0187] An acquisition module 420, configured to obtain service tag bit information of the BMC if the status of the buffer does not meet the requirements for data transmission between the BIOS and the BMC, where the service tag bit information is used to indicate the status of the Intelligent Management Platform Interface (IPMI) service of the BMC;

[0188] A generation module 430, configured to generate an error prompt message if the service tag bit information indicates that the status of the IPMI service is invalid; wherein, after a critical process of the BMC fails to execute, the BMC sets the service tag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC.

[0189] Optionally, the data transmission control device 400 further includes an execution module, configured to, if the service tag bit information indicates that the status of the IPMI service is valid and the number of times of reading the status of the buffer is less than a preset number of times, after delaying for a preset duration, return to execute the step of reading the status of the buffer in the Keyboard Controller Style (KCS) interface and increment the number of times of reading by 1; if the service tag bit information indicates that the status of the IPMI service is valid and the number of times of reading the status of the buffer reaches the preset number of times, generate an error prompt message.

[0190] Optionally, a first General-Purpose Input / Output (GPIO) interface on a Central Processing Unit (CPU) where the BIOS is located in the electronic device is connected to a second GPIO on the BMC; the output of the second GPIO includes the service tag bit information; the acquisition module 420 is further configured to obtain the service tag bit information from the second GPIO through the first GPIO.

[0191] Optionally, the electronic device further includes a Complex Programmable Logic Device (CPLD), the Central Processing Unit (CPU) where the BIOS is located is connected to the CPLD, and the BMC is connected to the CPLD; the CPLD is used to store the service tag bit information; the acquisition module 420 is further configured to obtain the service tag bit information from the CPLD.

[0192] Optionally, when the BIOS needs to send data to the BMC or receive data sent by the BMC, it is determined that the BIOS needs to perform data transmission with the BMC; the requirements for data transmission between the BIOS and the BMC include the requirement for the BIOS to send data to the BMC and the requirement for the BIOS to receive data sent by the BMC; the reading module 410 is further configured to, if the BIOS needs to send data to the BMC, read the status of the IBF; if the BIOS needs to receive data sent by the BMC, read the status of the OBF; the obtaining module 420 is further configured to, when the BIOS needs to send data to the BMC, if the status of the IBF does not meet the requirement for the BIOS to send data to the BMC, obtain the service tag bit information of the BMC; when the BIOS needs to receive data sent by the BMC, if the status of the OBF does not meet the requirement for the BIOS to receive data sent by the BMC, obtain the service tag bit information of the BMC.

[0193] Optionally, the data transmission control device 400 further includes a first data transmission module, and the first data transmission module is configured to, if the status of the IBF meets the requirement for the BIOS to send data to the BMC and the status of the KCS interface is in the write state, write the data to be sent into the KCS interface, so that the BMC reads the data to be sent from the KCS interface.

[0194] Optionally, the data transmission control device 400 further includes a second data transmission module, and the second data transmission module is configured to, if the status of the OBF meets the requirement for the BIOS to receive data sent by the BMC and the status of the KCS interface is in the read state, read the data to be received from the KSC interface, and the data to be received is written into the KSC interface by the BMC.

[0195] Figure 11 The structural schematic diagram of the computer system of the electronic device suitable for implementing the embodiments of the present application is shown.

[0196] It should be noted that Figure 11 The computer system 1000 of the shown electronic device is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present application. This electronic device can be used to implement the method provided by the present application.

[0197] Such as Figure 10As shown, computer system 1000 includes a Central Processing Unit (CPU) 1001, which can perform various appropriate actions and processes according to programs stored in a Read-Only Memory (ROM) 1002 or programs loaded from a storage section 1008 into a Random Access Memory (RAM) 1003, such as executing the methods in the above embodiments. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004. Of course, the computer system also includes a BMC, Figure 10 which is not shown.

[0198] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including, for example, a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read from it can be installed into the storage section 1008 as needed.

[0199] Specifically, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1009, and / or installed from the removable medium 1011. When the computer program is executed by a Central Processing Unit (CPU) 1001, various functions defined in the system of the present application are executed.

[0200] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a 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 above. In the present application, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0201] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0202] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not, in some cases, constitute a limitation on the units themselves.

[0203] As another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist alone without being assembled into the electronic device. The above computer-readable storage medium carries computer-readable instructions, and when the computer-readable storage instructions are executed by a processor, the methods in any of the above embodiments are implemented.

[0204] In the embodiments of this application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be an overall module or a part of the unit of its function.

[0205] According to one aspect of the embodiments of this application, there is provided a computer program product or a computer program, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods in any of the above embodiments.

[0206] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0207] Those skilled in the art can easily understand from the description of the above embodiments that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a portable hard drive, etc.) or on a network, including several instructions to enable a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.

[0208] After considering the specification and practicing the disclosed embodiments herein, those skilled in the art will readily conceive of other embodiments of the present application. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include common general knowledge or conventional technical means in the technical field not disclosed in the present application.

[0209] It should be understood that the present application is not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

Claims

1. A control method for data transmission, characterized in that, The basic input / output system BIOS applied to an electronic device, and the electronic device further includes a baseboard management controller BMC; the method includes: If the BIOS needs to perform data transmission with the BMC, read the status of the buffer in the keyboard controller KCS interface, where the buffer is an input buffer IBF or an output buffer OBF, and the BIOS communicates with the BMC through the KCS interface; If the status of the buffer does not meet the requirements for the BIOS to perform data transmission with the BMC, obtain the service tag bit information of the BMC, where the service tag bit information is used to indicate the status of the intelligent management platform interface IPMI service of the BMC; If the service tag bit information indicates that the status of the IPMI service is invalid, generate an error prompt message; where, after the critical process of the BMC cannot be executed, the BMC sets the service tag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC.

2. The method according to claim 1, wherein After obtaining the service tag bit information of the BMC, the method further includes: If the service tag bit information indicates that the status of the IPMI service is valid, and the number of times of reading the status of the buffer is less than the preset number of times, after a preset delay, return to execute the step of reading the status of the buffer in the keyboard controller KCS interface, and accumulate the number of times of reading by 1; If the service tag bit information indicates that the status of the IPMI service is valid, and the number of times of reading the status of the buffer reaches the preset number of times, generate an error prompt message.

3. The method according to claim 1, wherein The first general-purpose input / output interface GPIO on the central processing unit CPU where the BIOS is located in the electronic device is connected to the second GPIO on the BMC; the output of the second GPIO includes the service tag bit information; The obtaining the service tag bit information of the BMC includes: Obtain the service tag bit information from the second GPIO through the first GPIO.

4. The method according to claim 1, characterized in that The electronic device further includes a complex programmable logic device CPLD, the central processing unit CPU where the BIOS is located is connected to the CPLD, and the BMC is connected to the CPLD; The CPLD is used to store the service tag bit information; The obtaining the service tag bit information of the BMC includes: Obtain the service tag bit information from the CPLD.

5. The method according to claim 1, wherein In the case where the BIOS needs to send data to the BMC or the BIOS needs to receive data sent by the BMC, it is determined that the BIOS needs to perform data transmission with the BMC; the requirements for the BIOS to perform data transmission with the BMC include the requirement for the BIOS to send data to the BMC and the requirement for the BIOS to receive data sent by the BMC; The step of if the BIOS needs to perform data transmission with the BMC, read the status of the buffer in the keyboard controller KCS interface includes: If the BIOS needs to send data to the BMC, read the status of the IBF; If the BIOS needs to receive data sent by the BMC, read the status of the OBF; If the status of the status register does not meet the requirements for data transmission between the BIOS and the BMC, obtain the service tag bit information of the BMC, including: When the BIOS needs to send data to the BMC, if the status of the IBF does not meet the requirements for the BIOS to send data to the BMC, obtain the service tag bit information of the BMC; When the BIOS needs to receive data sent by the BMC, if the status of the OBF does not meet the requirements for the BIOS to receive data sent by the BMC, obtain the service tag bit information of the BMC.

6. The method according to claim 5, characterized in that After the BIOS needs to send data to the BMC and reads the status of the IBF, the method further includes: If the status of the IBF meets the requirements for the BIOS to send data to the BMC, and the status of the KCS interface is the write state, write the data to be sent in the KCS interface, so that the BMC reads the data to be sent from the KCS interface.

7. The method according to claim 5, characterized in that After the BIOS needs to receive data sent by the BMC and reads the status of the OBF, the method further includes: If the status of the OBF meets the requirements for the BIOS to receive data sent by the BMC, and the status of the KCS interface is the read state, read the data to be received from the KSC interface, and the data to be received is written by the BMC into the KSC interface.

8. A control device for data transmission, characterized in that, Applied to the basic input output system BIOS in an electronic device, the electronic device further includes a baseboard management controller BMC; the device includes: A reading module, configured to read the status of the buffer in the keyboard controller KCS interface if the BIOS needs to perform data transmission with the BMC, the buffer being an input buffer IBF or an output buffer OBF, and the BIOS communicates with the BMC through the KCS interface; An obtaining module, configured to obtain the service tag bit information of the BMC if the status of the buffer does not meet the requirements for data transmission between the BIOS and the BMC, and the service tag bit information is used to indicate the status of the intelligent management platform interface IPMI service of the BMC; A generating module, configured to generate an error prompt message if the service tag bit information indicates that the status of the IPMI service is invalid; wherein, after the key process of the BMC cannot be executed, the BMC sets the service tag bit information to indicate that the status of the IPMI service is invalid, and then restarts the BMC.

9. An electronic device, characterized in that, Including: A processor; A memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, the method according to any one of claims 1-7 is implemented.

10. A computer-readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the method according to any one of claims 1-7 is implemented.

11. A computer program product, comprising computer instructions, characterized in that, When the computer instructions are executed by a processor, the method according to any one of claims 1-7 is implemented.