Channel control method, controller, computer device and storage medium
By acquiring host system attribute values and memory information through the baseboard management controller, the preset KCS channel is identified and closed. This solves the problem in the prior art that closing the preset KCS channel affects the use of other channels and poses security risks, and realizes a method to safely close the channel after the host system self-test.
Patent Information
- Application Number
- PCT/CN2025/098170
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-27
- Filing Date
- 2025-05-29
- Publication Date
- 2026-03-05
AI Technical Summary
In existing technologies, disabling the preset KCS channel via IPMI commands can affect the use of other KCS channels. Furthermore, the shutdown of the preset KCS channel cannot be guaranteed during BMC restart or factory reset, posing a security risk. Moreover, it does not take into account whether the host system has completed the power-on self-test process.
A channel control method is provided, which obtains the attribute values of the host system and the channel shutdown information in the memory through the baseboard management controller, determines the preset KCS channel, and shuts down the preset KCS channel after the host system completes the power-on self-test to avoid affecting the use of other KCS channels, and keeps the channel shut down during BMC restart or factory reset.
This ensures that the preset KCS channel is closed after the host system completes its power-on self-test, thus avoiding interference with the use of other KCS channels, resolving potential security risks. Furthermore, it keeps the channel closed during BMC restarts or factory resets, improving system security and reliability.
Smart Images

Figure CN2025098170_05032026_PF_FP_ABST
Abstract
Description
A channel control method, controller, computer device, and storage medium.
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202411182291.0, filed on August 27, 2024, entitled "A method for controlling a channel, a controller, a computer device and a storage medium", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of computer technology, and in particular to a channel control method, controller, computer device and storage medium. Background Technology
[0004] The Keyboard Controller Style (KCS) interface is a protocol used for communication with a keyboard controller. This interface is typically used for communication between the system management controller and the keyboard controller for low-level keyboard control and status queries. However, in modern server environments, the KCS interface can also be reused as a low-speed, simple, bidirectional serial interface for Intelligent Platform Management Interface (IPMI) data exchange between the Baseboard Management Controller (BMC) and the Operating System (OS). It is a mechanism used by OpenBMC (Open Baseboard Management Controller) to implement IPMI communication.
[0005] The OS uses multiple KCS channels to access the BMC, each with a different function. Among these, one KCS channel is used for communication between the in-band OS and the BMC; this channel is also known as the preset KCS channel. To ensure data security, the preset KCS channel can be disabled, thereby shutting down the communication channel between the in-band OS and the BMC. This prevents network attacks from using the preset KCS channel to obtain or set BMC information, which could then impact the out-of-band management system and create security vulnerabilities.
[0006] In related technologies, the default KCS channel can be disabled using IPMI commands. However, this method requires disabling the channel used by the OS to access the BMC, which will affect the use of other KCS channels besides the default KCS channel. Summary of the Invention
[0007] In a first aspect, this application provides a channel control method applied to a baseboard management controller (KCS). Multiple KCS channels exist between a host system and the baseboard management controller. The method includes: in response to determining that a preset KCS channel closure instruction has been received and a control process has started, obtaining the attribute value of the host system at the current moment, and obtaining channel closure information stored in the memory of the baseboard management controller, wherein the attribute value is used to indicate whether the host system has completed the power-on self-test process; in response to determining that the attribute value is a first attribute value, determining a preset KCS channel from the multiple KCS channels, wherein the first attribute value indicates that the host system has completed the power-on self-test process; and closing the preset KCS channel through the channel closure information and the control process.
[0008] Based on the method provided in the first aspect above, in response to determining that a command to close a preset KCS channel has been received and the control process has been started, the attribute value of the host system at the current moment can be obtained, and the channel closure information stored in the memory of the baseboard management controller can be obtained; in response to determining that the attribute value is the first attribute value, the preset KCS channel can be determined from multiple KCS channels, and the preset KCS channel can be closed through the channel closure information and the control process.
[0009] In response to the confirmation that the preset KCS channel has been closed and the control process has started, the current attribute value of the host system is the first attribute value, which indicates that the host system has completed the power-on self-test process at the current moment.
[0010] In some implementations, in response to determining that the attribute value is a second attribute value, the attribute value of the host system is monitored for a preset time, the second attribute value being used to indicate that the host system has not completed the power-on self-test process; in response to determining that the attribute value changes from the second attribute value to the first attribute value within the preset time, a preset KCS channel is determined from multiple KCS channels, and the preset KCS channel is closed through channel closure information and control process; in response to determining that the attribute value is the second attribute value within the preset time, the control process is closed.
[0011] Based on the above method, the attribute values of the host system can be monitored within a preset time when the host system has not completed the power-on self-test process. After the host system completes the power-on self-test process, the preset KCS channel can be closed through channel shutdown information and control process.
[0012] In some implementations, a preset KCS channel corresponds to a preset channel identifier; in response to determining that the attribute value is a first attribute value, the preset KCS channel is determined from multiple KCS channels, including: in response to determining that the attribute value is a first attribute value, receiving channel parameters of each KCS channel in the multiple KCS channels, the channel parameters including the channel identifier of each KCS channel; based on the channel parameters, selecting KCS channels from the multiple KCS channels whose channel identifier is the preset channel identifier and determining them as preset KCS channels.
[0013] In some implementations, closing a preset KCS channel via channel closure information and a control process includes: in response to the control process determining that the stored information in the memory is channel closure information, executing the service manager's closure method to close the preset channel process, thereby closing the preset KCS channel, wherein the preset channel process is the process corresponding to the preset KCS channel.
[0014] Based on the above method, when the stored information in the memory is channel closure information, the preset channel process can be closed through the service manager, thereby closing the preset KCS channel.
[0015] In some implementations, the control process is a non-daemon process type. Before the control process is started, the method further includes: receiving a command to close a preset KCS channel and storing the channel closure information carried by the command in a memory; restarting the baseboard management controller and obtaining the stored information in the memory; and starting the control process in response to determining that the stored information is channel closure information.
[0016] Based on the above method, when the control process is of the non-daemon type, the command to close the preset KCS channel requires the baseboard management controller to be restarted for it to take effect.
[0017] In some implementations, the control process is a non-daemon process type, and the method further includes: in response to determining that a preset KCS channel opening instruction has been received, obtaining channel opening information stored in the memory; restarting the baseboard management controller, determining the preset KCS channel from multiple KCS channels; and, based on the channel opening information, executing the service manager's opening method to open the preset channel process, thereby opening the preset KCS channel.
[0018] Based on the above method, when the control process is of the non-daemon type, the command to enable the preset KCS channel requires the baseboard management controller to be restarted before it can take effect.
[0019] In some implementations, the control process is a daemon process, and the method further includes: in response to determining that a command to open a preset KCS channel has been received, obtaining channel opening information stored in memory; determining a preset KCS channel from multiple KCS channels; and, based on the channel opening information, executing the service manager's opening method to open the preset channel process, thereby opening the preset KCS channel.
[0020] Based on the above method, when the control process is of the daemon type, the command to enable the preset KCS channel can take effect immediately.
[0021] In some implementations, the method further includes: in response to determining that the attribute value is the first attribute value, determining other KCS channels besides the preset KCS channels from a plurality of KCS channels; executing the service manager's start method to start each channel process in the other channel processes to start the other KCS channels, wherein the other channel processes are the channel processes corresponding to the other KCS channels.
[0022] Based on the above method, other KCS channels besides the preset KCS channel can be identified from multiple KCS channels. Since other KCS channels are enabled by default, the enabling method of the service manager can be used to enable each channel process in the other channel process to enable the other KCS channels.
[0023] In some implementations, after closing the preset KCS channel via channel closure information and control process, the method further includes: restarting the board management controller, acquiring stored information in the memory; and, in response to determining that the stored information is channel closure information, keeping the preset KCS channel in the closed state.
[0024] Based on the above method, since the memory stores channel closure information, after closing the preset KCS channel, in response to determining whether the substrate management controller is restarted or restored to factory settings, the information stored in the memory is obtained as channel closure information, that is, the preset channel process is not allowed to start, and thus the preset KCS channel is kept in the closed state throughout the entire process of restarting or restoring the substrate management controller to factory settings.
[0025] In some implementations, in response to determining that the host system has restarted, the status information of the preset KCS channel is obtained, the status information being used to indicate whether the preset KCS channel is in a closed state; in response to determining that the preset KCS channel is not in a closed state, the preset KCS channel is kept in an open state; in response to determining that the KCS channel is in a closed state, the start method of the service manager is executed to start the preset channel process, thereby starting the preset KCS channel; the attribute value of the host system is monitored; in response to determining that the attribute value is the first attribute value, the stop method of the service manager is executed to stop the preset channel process, thereby stopping the preset KCS channel.
[0026] Based on the above method, since the host system needs to perform a power-on self-test (POST) upon restart, and during this POST, it needs to transmit management information to the baseboard management controller via a preset KCS channel to complete the power-on process, it's possible to first determine if the preset KCS channel is in a closed state when restarting the host system. If it's determined that the preset KCS channel is in an open state, then keep it open; if it's determined that the preset KCS channel is in a closed state, then open it. Furthermore, to prevent network security vulnerabilities and attacks on the baseboard management controller via the preset KCS channel, it's necessary to continuously monitor the host system's attribute values, and close the preset KCS channel when the attribute value reaches the first attribute value, i.e., after the host system completes the POST process.
[0027] In some implementations, the method further includes: in response to determining that the host system is in a powered-off state and that the preset KCS channel is not in a closed state, keeping the preset KCS channel in an open state.
[0028] Based on the above method, even if the preset KCS channel is enabled when the host system is powered off, there is no network security risk. Viruses cannot attack the board management controller through the preset KCS channel from the host system. Therefore, the KCS channel can be kept enabled.
[0029] In some implementations, the control process is used to control the opening and closing of a preset KCS channel. The control process includes a non-daemon type control process and a daemon type control process. The non-daemon type control process controls the closing of the preset KCS channel according to the command to close the preset KCS channel after restarting the board management control. The daemon type control process controls the closing of the preset KCS channel according to the command to close the preset KCS channel.
[0030] In some implementations, the command to disable the default KCS channel is an IPMI command set by the user through the IPMI tool of the intelligent management platform.
[0031] In some implementations, the step of closing a preset KCS channel via channel closing information and control process includes:
[0032] Generate the channel process corresponding to the preset KCS channel; and
[0033] The preset KCS channel is closed by disabling the channel process through the channel shutdown information and control process.
[0034] In some implementations, the KCS channel is preset as the path for the in-band operating system (OS) to access the board management controller.
[0035] In some implementations, the KCS channel is preset to the KCS3 channel, which is the only path for the in-band operating system (OS) to access the board management controller.
[0036] Secondly, this application provides a baseboard management controller, in which multiple KCS channels exist between the host system and the baseboard management controller. The baseboard management controller includes: an acquisition module, configured to, in response to determining that a command to close a preset KCS channel has been received and a control process has been started, acquire the attribute value of the host system at the current moment, and acquire channel closure information stored in the memory of the baseboard management controller, wherein the attribute value is used to indicate whether the host system has completed the power-on self-test process; a processing module, configured to, in response to determining that the attribute value is a first attribute value, determine the preset KCS channel from the multiple KCS channels, wherein the first attribute value indicates that the host system has completed the power-on self-test process; the processing module is further configured to close the preset KCS channel through the channel closure information and the control process.
[0037] Thirdly, this application provides a computer device, comprising:
[0038] One or more processors; and
[0039] A memory associated with one or more processors, the memory being used to store computer-readable instructions that, when read and executed by one or more processors, implement a channel control method as described in the first aspect above or any of its corresponding embodiments.
[0040] Fourthly, this application provides a non-volatile computer-readable storage medium storing computer-readable instructions that, when executed by one or more processors, implement the channel control method described in the first aspect or any corresponding embodiment thereof.
[0041] Fifthly, this application provides a computer program product including computer-readable instructions, which, when executed by one or more processors, implement a channel control method for the first aspect described above or any corresponding embodiment thereof. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0043] Figure 1 is a flowchart illustrating a channel control method according to an embodiment of this application;
[0044] Figure 2 is a flowchart illustrating another channel control method according to an embodiment of this application;
[0045] Figure 3 is a structural block diagram of a baseboard management controller according to an embodiment of this application;
[0046] Figure 4 is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application;
[0047] Figure 5 is a schematic diagram of the structure of a non-volatile computer-readable storage medium according to an embodiment of this application.
[0048] Figure 6 is a schematic diagram of the structure of a computer program product according to an embodiment of this application. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0050] The default KCS channel can be disabled via IPMI command. The default KCS channel is the path for the in-band OS to access the BMC. However, this method requires disabling the channel used by the OS to access the BMC, which will affect the use of other KCS channels besides the default one. Furthermore, during BMC reboot or factory reset, this method cannot guarantee that the default KCS channel is disabled during the boot process; it must be disabled after the BMC starts up, which could lead to security risks.
[0051] Furthermore, disabling or enabling the default KCS channel via IPMI commands takes effect immediately, without considering whether the host system has completed the Power On Self-Test (POST). The BIOS POST process requires the default KCS channel for interaction between the OS and the BMC. If the default KCS channel is disabled before the BIOS completes the POST process, some information cannot be transmitted to the BMC. Moreover, this method requires a loop to continuously monitor a directory for a flag file indicating whether the default KCS channel is disabled, thus enabling / disabling in-band OS access to the BMC path. This continuous monitoring wastes BMC performance.
[0052] To address the aforementioned technical problems, this application provides a channel control method that can resolve the issue of closing channels used by the OS to access the BMC in order to close a preset KCS channel, thereby affecting the use of other KCS channels besides the preset KCS channel.
[0053] In this embodiment of the application, the channel control method described above can be executed by a substrate management controller. According to this embodiment, a channel control method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.
[0054] In some embodiments, a channel control method is provided, which can be used in a baseboard management controller (KCS) where multiple KCS channels exist between a host system and the baseboard management controller. Figure 1 is a flowchart of the channel control method according to an embodiment of this application. As shown in Figure 1, the process includes the following steps:
[0055] S101: In response to determining that a command to close a preset KCS channel has been received and the control process has started, the system obtains the attribute value of the host system at the current moment and the channel closure information stored in the memory of the board management controller.
[0056] The command to close the preset KCS channel is an IPMI command set by the user through the intelligent platform management interface tool ipmitool.
[0057] In this embodiment, the control process is also referred to as the kcs-control process. The control process is used to control the opening and closing of the preset KCS channel. The control process is divided into non-daemon process type and daemon process type. For non-daemon process type control processes, the command to close the preset KCS channel only takes effect after restarting the BMC. For daemon process type control processes, the command to close the preset KCS channel takes effect immediately.
[0058] In this embodiment, the preset KCS channel can be the KCS3 channel. It is understood that the KCS3 channel is the only path for the in-band OS to access the BMC.
[0059] In this embodiment, the attribute value is also called the OsState attribute. The attribute value is used to indicate whether the host system has completed the power-on self-test (POST) process. Whether the host system has completed the POST process can also be referred to as whether the BIOS has completed the POST process.
[0060] The attribute value can be either the first attribute value or the second attribute value. A first attribute value of "Standby" indicates that the host system has completed the power-on self-test (POST) process. A second attribute value of "Inactive" indicates that the host system has not completed the power-on self-test (POST) process.
[0061] In this embodiment of the application, the memory of the substrate management controller can be an electrically erasable programmable read-only memory (EEPROM).
[0062] In this embodiment, the channel closing information is the value used to set the channel to be closed.
[0063] For example, in response to determining that the BMC has received a command to close the preset KCS channel and the control process has started, the OsState property of the host system is monitored through the match method of C++ to obtain the current property value of the host system, and the stored value of setting the channel to be closed is obtained from the EEPROM of the BMC.
[0064] In some implementations, in response to determining that the control process is a non-daemon process type, the BMC receives a command to close a preset KCS channel before the control process is started, and stores the channel closure information carried by the command in the memory; restarts the board management controller and retrieves the stored information in the memory; in response to determining that the stored information is channel closure information, the control process is started.
[0065] In some examples, the kcs-control process corresponds to a service file (kcsControl.service), and the process is started or stopped through this service file.
[0066] In the service file (kcsControl.service), an ExecCondition (prerequisite) can be added. ExecCondition can only return 0 or a non-zero number. Assigning the value kcsControlCanStart to ExecCondition will execute the action of starting the kcs-control process if kcsControlCanStart is determined to be 0. If kcsControlCanStart is determined to be non-zero, the action of starting the kcs-control process will not be executed.
[0067] Understandably, in response to determining that the control process is of the daemon type, the control process can be started directly.
[0068] S102: In response to determining that the attribute value is the first attribute value, a preset KCS channel is determined from multiple KCS channels.
[0069] In this embodiment, the preset KCS channel corresponds to a preset channel identifier. The preset KCS channel corresponds to a preset channel process.
[0070] Understandably, in OpenBMC, each KCS channel generates a corresponding KCS message receiving and processing process (referred to as the channel process). Disabling the corresponding process also closes the corresponding KCS channel. Therefore, disabling in-band OS access to the BMC path means disabling the process corresponding to the KCS3 channel, and vice versa.
[0071] In some implementations, in response to determining that the attribute value is the first attribute value, the BMC receives the channel parameters of each of the multiple KCS channels; based on the channel parameters, it selects the KCS channels whose channel identifier is a preset channel identifier from the multiple KCS channels and determines them as preset KCS channels. The channel parameters include the channel identifier of each KCS channel.
[0072] Understandably, BMC can also determine other KCS channels besides the preset KCS channels from multiple KCS channels.
[0073] In some examples, in response to determining that the attribute value is the first attribute value, the BMC determines other KCS channels besides the preset KCS channels from multiple KCS channels; it executes the service manager's start method to start each channel process in the other channel processes to start the other KCS channels, where the other channel processes are the channel processes corresponding to the other KCS channels.
[0074] S103: Close the preset KCS channel via channel closing information and control process.
[0075] In some implementations, in response to the determination control process determining that the stored information in the memory is channel closure information, the BMC executes the service manager's closure method to close the preset channel process, thereby closing the preset KCS channel.
[0076] For example, in response to the determination control process determining that the stored information in the memory is channel closure information, the BMC executes the StopUnit method of the service manager systemd to close the KCS3 process, thereby closing the KCS3 channel.
[0077] In some embodiments, in response to determining that the attribute value is the first attribute value, the BMC determines other KCS channels besides the preset KCS channel from multiple KCS channels; and executes the service manager's start method to start each channel process in the other channel processes, thereby starting the other KCS channels. Here, the other channel processes are the channel processes corresponding to the other KCS channels.
[0078] In some examples, each channel process has a corresponding service file, and the process is started or stopped through the service file, thereby controlling whether the KCS channel is open.
[0079] In the service file (kcsBridge.service), an ExecCondition (prerequisite) can be added. ExecCondition can only return 0 or a non-zero number. Assigning the value kcsBridgeCanStart to ExecCondition will trigger the action of starting the KCS channel process if kcsBridgeCanStart is 0. If kcsBridgeCanStart is non-zero, the action of starting the KCS channel process will not be triggered.
[0080] For example, in response to determining that the attribute value is the first attribute value, the BMC determines other KCS channels besides the preset KCS channels from multiple KCS channels; obtains the service file corresponding to the channel process of each channel in the other KCS channels; in response to determining that kcsBridgeCanStart in the service file is 0, the systemd StartUnit method is executed to start each channel process in the other channel processes, so as to start the other KCS channels.
[0081] In some embodiments, in response to determining that the attribute value is the second attribute value, the BMC monitors the attribute value of the host system for a preset time period; in response to determining that the attribute value changes from the second attribute value to the first attribute value within the preset time period, a preset KCS channel is determined from multiple KCS channels, and the preset KCS channel is closed via channel closure information and a control process; in response to determining that the attribute value is the second attribute value within the preset time period, the control process is closed. The preset time period can be set according to actual needs and is not limited.
[0082] In some implementations, in response to determining that the control process is a daemon process, when the BMC receives an instruction to enable a preset KCS channel, it retrieves the channel enabling information stored in the memory; restarts the baseboard management controller, determines the preset KCS channel from multiple KCS channels; and, based on the channel enabling information, executes the service manager's enabling method to enable the preset channel process, thereby enabling the preset KCS channel. The channel enabling information refers to the value used to enable the channel.
[0083] In some implementations, in response to determining that the control process is of the daemon type, when the BMC receives an instruction to open a preset KCS channel, it obtains the channel opening information stored in the memory; determines the preset KCS channel from multiple KCS channels; and, based on the channel opening information, executes the service manager's opening method to open the preset channel process, thereby opening the preset KCS channel.
[0084] Based on the methods of S101 to S103 above, the BMC can, in response to determining that it has received a command to close a preset KCS channel and when the control process is started, obtain the attribute value of the host system at the current time and obtain the channel closure information stored in the memory of the baseboard management controller; in response to determining that the attribute value is the first attribute value, it determines the preset KCS channel from multiple KCS channels and closes the preset KCS channel through the channel closure information and the control process.
[0085] In response to receiving the command to close the preset KCS channel and initiating the control process, the current attribute value of the host system is the first attribute value, indicating that the host system has completed the power-on self-test (POST) process. Since the host system needs to transmit information through the preset KCS channel during the POST, closing the preset KCS channel via the channel closure message and the control process after the host system has completed the POST process avoids the problem of the host system being unable to transmit information to the board management controller through the preset KCS channel during the POST, thus preventing the host system from booting up. Furthermore, since the preset KCS channel can be identified, it avoids the problem of closing channels used by the OS to access the BMC in order to close the preset KCS channel, which could affect the use of other KCS channels besides the preset KCS channel.
[0086] Furthermore, after the BMC closes the preset KCS channel through the channel closure information and control process, it can also restart the board management controller and obtain the stored information in the memory; in response to determining that the stored information is channel closure information, it restarts the control process.
[0087] Understandably, since the memory stores channel shutdown information, after the preset KCS channel is shut down, the system can obtain the channel shutdown information in the memory in response to determining whether the board management controller is restarting or restoring the BMC to factory settings, thereby keeping the preset KCS channel in a closed state and ensuring that the board management controller is not attacked by hackers or viruses through the preset KCS channel during the restart process.
[0088] In some implementations, in response to determining that the host system has restarted, the status information of the preset KCS channel is obtained; in response to determining that the preset KCS channel is not in a closed state, the preset KCS channel is kept in an open state; in response to determining that the KCS channel is in a closed state, the service manager's start method is executed to start the preset channel process, thereby starting the preset KCS channel; the host system's attribute value is monitored; in response to determining that the attribute value is the first attribute value, the service manager's stop method is executed to stop the preset channel process, thereby stopping the preset KCS channel. The status information is used to indicate whether the preset KCS channel is in a closed state.
[0089] In some implementations, in response to determining that the host system is in a powered-off state and the preset KCS channel is not in a closed state, the BMC keeps the preset KCS channel in an open state.
[0090] If the control process is a non-daemon process, a channel control method is provided in some embodiments, which can be used in the BMC described above. Figure 2 is a flowchart of another channel control method according to an embodiment of this application. As shown in Figure 2, the process includes the following steps:
[0091] S201: Receive the command to close the preset KCS channel and store the channel closure information carried by the command in the memory;
[0092] S202: Restart the baseboard management controller and retrieve the stored information from the memory;
[0093] S203: Determine whether the stored information is channel closure information;
[0094] S204: In response to determining that the stored information is channel open information, the control process is closed and the control channel is terminated.
[0095] S205: In response to determining that the stored information is channel closed information, the control process is started.
[0096] S206: Initiate the control process and obtain the attribute values of the host system at the current moment;
[0097] S207: Determine if the attribute value is the first attribute value;
[0098] S208: In response to determining that the attribute value is the first attribute value, close the preset KCS channel.
[0099] S209: In response to determining that the attribute value is not the second attribute value, monitor the attribute value of the host system;
[0100] S210: Detected that the attribute value changed from the second attribute value to the first attribute value, execute S208.
[0101] In some embodiments, a baseboard management controller is also provided for implementing the above embodiments and implementation methods; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0102] Some embodiments provide a baseboard management controller, as shown in FIG3, including:
[0103] The acquisition module 301 is used to acquire the attribute value of the host system at the current time in response to the determination that the preset KCS channel is closed and the control process is started, and to acquire the channel closure information stored in the memory of the baseboard management controller. The attribute value is used to indicate whether the host system has completed the power-on self-test process.
[0104] The processing module 302 is used to determine a preset KCS channel from multiple KCS channels in response to the determination that the attribute value is the first attribute value. The first attribute value indicates that the host system completes the power-on self-test process.
[0105] The processing module 302 is also used to close the preset KCS channel through channel closing information and control process.
[0106] In some embodiments, the processing module 302 is further configured to, in response to determining that the attribute value is a second attribute value, monitor the attribute value of the host system within a preset time, wherein the second attribute value is used to indicate that the host system has not completed the power-on self-test process; the processing module 302 is further configured to, in response to determining that the attribute value changes from the second attribute value to the first attribute value within the preset time, determine a preset KCS channel from multiple KCS channels and close the preset KCS channel through channel closing information and control process; the processing module 302 is further configured to, in response to determining that the attribute value is the second attribute value within the preset time, close the control process.
[0107] In some implementations, the preset KCS channel corresponds to a preset channel identifier; the processing module 302 is used to receive the channel parameters of each KCS channel among multiple KCS channels in response to the determination that the attribute value is the first attribute value, the channel parameters including the channel identifier of each KCS channel; the processing module 302 is also used to filter the KCS channels with the channel identifier as the preset channel identifier from multiple KCS channels based on the channel parameters and determine them as preset KCS channels.
[0108] In some implementations, the processing module 302 is further configured to, in response to the determination control process determining that the storage information in the memory is channel closure information, execute the service manager's closure method to close the preset channel process, thereby closing the preset KCS channel, wherein the preset channel process is the process corresponding to the preset KCS channel.
[0109] In some implementations, the control process is a non-daemon process. Before the control process is started, the processing module 302 is also used to receive a command to close a preset KCS channel and store the channel closure information carried by the command in the memory. The processing module 302 is also used to restart the baseboard management controller and obtain the stored information in the memory. The processing module 302 is also used to start the control process in response to determining that the stored information is channel closure information.
[0110] In some implementations, the control process is a non-daemon process type. The acquisition module 301 is further configured to acquire the channel opening information stored in the memory in response to the determination of receiving the instruction to open the preset KCS channel. The processing module 302 is further configured to restart the baseboard management controller and determine the preset KCS channel from multiple KCS channels. The processing module 302 is further configured to execute the service manager's opening method to open the preset channel process based on the channel opening information, so as to open the preset KCS channel.
[0111] In some implementations, the control process is a daemon process. The acquisition module 301 is further configured to acquire the channel opening information stored in the memory in response to the determination of receiving the instruction to open the preset KCS channel. The processing module 302 is further configured to determine the preset KCS channel from multiple KCS channels. The processing module 302 is further configured to execute the service manager's opening method to open the preset channel process based on the channel opening information, so as to open the preset KCS channel.
[0112] In some implementations, the processing module 302 is further configured to, in response to determining that the attribute value is the first attribute value, determine other KCS channels from the plurality of KCS channels besides the preset KCS channels; the processing module 302 is further configured to execute the service manager's start method to start each channel process in the other channel processes, so as to start other KCS channels, wherein the other channel processes are the channel processes corresponding to other KCS channels.
[0113] In some implementations, the acquisition module 301 is further configured to restart the baseboard management controller and acquire the stored information in the memory; the processing module 302 is further configured to restart the control process in response to determining that the stored information is channel closed information.
[0114] In some implementations, the acquisition module 301 is further configured to acquire the status information of the preset KCS channel in response to determining that the host system has restarted, the status information being used to indicate whether the preset KCS channel is in a closed state; the processing module 302 is further configured to keep the preset KCS channel in an open state in response to determining that the preset KCS channel is not in a closed state; the processing module 302 is further configured to execute the service manager's start method to start the preset channel process in response to determining that the KCS channel is in a closed state, thereby starting the preset KCS channel; the processing module 302 is further configured to monitor the attribute values of the host system; the processing module 302 is further configured to execute the service manager's stop method to stop the preset channel process in response to determining that the attribute value is the first attribute value, thereby stopping the preset KCS channel.
[0115] In some implementations, the processing module 302 is further configured to maintain the preset KCS channel in the open state in response to determining that the host system is in a power-off state and the preset KCS channel is not in a closed state.
[0116] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0117] In some embodiments, the baseboard management controller is presented in the form of a functional unit, where a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0118] This application also provides a computer device having the baseboard management controller shown in FIG3 above.
[0119] Please refer to Figure 4, which is a schematic diagram of a computer device according to an embodiment of this application. As shown in Figure 4, the computer device includes one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or otherwise as needed. The processor can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if needed. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 uses one processor 10 as an example.
[0120] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include hardware. The hardware may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0121] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0122] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 20 includes memory remotely located relative to the processor 10, and these remote memories can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0123] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0124] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means; Figure 4 shows an example of a connection via a bus.
[0125] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some embodiments, the display device may be a touchscreen.
[0126] As shown in Figure 5, this application embodiment also provides a non-volatile computer-readable storage medium. The methods described above according to this application embodiment can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.
[0127] As shown in Figure 6, a portion of this application can be applied as a computer program product, such as computer-readable instructions. When executed by one or more processors, these instructions, through the operation of the processors, can invoke or provide the methods and / or technical solutions according to this application. Those skilled in the art will understand that the forms in which computer-readable instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, and installation package files. Accordingly, the ways in which computer-readable instructions are executed by a processor include, but are not limited to: the processor directly executing the instructions; the processor compiling the instructions and then executing the corresponding compiled program; the processor reading and executing the instructions; or the processor reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the processor.
[0128] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A channel control method, characterized in that, Applied to a baseboard management controller, where multiple keyboard controller style (KCS) channels exist between the host system and the baseboard management controller, the method includes: In response to the determination that a preset KCS channel shutdown command has been received and the control process has started, the attribute value of the host system at the current moment is obtained, and the channel shutdown information stored in the memory of the baseboard management controller is obtained. The attribute value is used to indicate whether the host system has completed the power-on self-test process. In response to determining that the attribute value is a first attribute value, the preset KCS channel is determined from the plurality of KCS channels, and the first attribute value instructs the host system to complete the power-on self-test process; and The preset KCS channel is closed via the channel closure information and the control process.
2. The method according to claim 1, characterized in that, The method further includes: In response to determining that the attribute value is the second attribute value, the attribute value of the host system is monitored for a preset time, and the second attribute value is used to indicate that the host system has not completed the power-on self-test process; In response to determining that the attribute value changes from the second attribute value to the first attribute value within the preset time period, the preset KCS channel is determined from the plurality of KCS channels, and the preset KCS channel is closed via the channel closure information and the control process; and In response to determining that the attribute value is the second attribute value within the preset time period, the control process is shut down.
3. The method according to claim 2, characterized in that, The preset KCS channel corresponds to a preset channel identifier; The step of determining the preset KCS channel from the plurality of KCS channels in response to determining that the attribute value is the first attribute value includes: In response to determining that the attribute value is the first attribute value, the channel parameters of each KCS channel in the plurality of KCS channels are received, the channel parameters including the channel identifier of each KCS channel; as well as Based on the channel parameters, the KCS channel with the preset channel identifier is selected from the plurality of KCS channels and determined as the preset KCS channel.
4. The method according to claim 3, characterized in that, The step of closing the preset KCS channel via the channel closing information and the control process includes: In response to the control process determining that the stored information in the memory is the channel closure information, the service manager executes the closure method to close the preset channel process, thereby closing the preset KCS channel, where the preset channel process is the process corresponding to the preset KCS channel.
5. The method according to claim 4, characterized in that, The control process is a non-daemon process. Before the control process starts, the method further includes: Receive the instruction to close the preset KCS channel, and store the channel closure information carried by the instruction to close the preset KCS channel in the memory; Restart the baseboard management controller to obtain the stored information in the memory; and In response to determining that the stored information is the channel closure information, the control process is initiated.
6. The method according to claim 5, characterized in that, The control process is of the non-daemon process type, and the method further includes: In response to receiving a command to enable a preset KCS channel, the channel enabling information stored in the memory is obtained; Restart the substrate management controller to determine the preset KCS channel from the plurality of KCS channels; and Based on the channel opening information, the service manager's opening method is executed to start the preset channel process, thereby opening the preset KCS channel.
7. The method according to claim 5, characterized in that, The control process is a daemon process, and the method further includes: In response to receiving a command to enable a preset KCS channel, the channel enabling information stored in the memory is obtained; Determine the preset KCS channel from the plurality of KCS channels; and Based on the channel opening information, the service manager's opening method is executed to start the preset channel process, thereby opening the preset KCS channel.
8. The method according to claim 6, characterized in that, The method further includes: In response to determining that the attribute value is the first attribute value, other KCS channels besides the preset KCS channel are determined from the plurality of KCS channels; and The service manager is executed to start each channel process in the other channel processes to start the other KCS channels. The other channel processes are the channel processes corresponding to the other KCS channels.
9. The method according to claim 6, characterized in that, After closing the preset KCS channel via the channel closure information and the control process, the method further includes: Restart the baseboard management controller to obtain the stored information in the memory; and In response to determining that the stored information is the channel closure information, the control process is restarted.
10. The method according to claim 8, characterized in that, The method further includes: In response to determining that the host system is restarting, the status information of the preset KCS channel is obtained, and the status information is used to indicate whether the preset KCS channel is in a closed state; In response to determining that the preset KCS channel is not in a closed state, the preset KCS channel is kept in an open state; In response to determining that the KCS channel is in a closed state, the opening method of the service manager is executed to start the preset channel process, thereby opening the preset KCS channel; Monitor the attribute values of the host system; and In response to determining that the attribute value is the first attribute value, the shutdown method of the service manager is executed to shut down the preset channel process, thereby shutting down the preset KCS channel.
11. The method according to claim 10, characterized in that, The method further includes: In response to determining that the host system is in a powered-off state and that the preset KCS channel is not in a closed state, the preset KCS channel is kept in the open state.
12. The method according to claim 1, characterized in that, The control process is used to control the opening and closing of the preset KCS channel. The control process includes a non-daemon type control process and a daemon type control process. The non-daemon type control process controls the closing of the preset KCS channel according to the command to close the preset KCS channel after restarting the board management control. The daemon type control process controls the closing of the preset KCS channel according to the command to close the preset KCS channel.
13. The method according to claim 12, characterized in that, The command to close the preset KCS channel is an IPMI command set by the user through the intelligent management platform tool ipmitool.
14. The method according to claim 1, characterized in that, The step of closing the preset KCS channel through the channel closing information and the control process includes: Generate the channel process corresponding to the preset KCS channel; and The preset KCS channel is closed by disabling the channel process through the channel closure information and the control process.
15. The method according to claim 1, characterized in that, The preset KCS channel is the path for the in-band operating system (OS) to access the baseboard management controller.
16. The method according to claim 15, characterized in that, The preset KCS channel is the KCS3 channel, and the KCS3 channel is the only path for the in-band operating system (OS) to access the baseboard management controller.
17. A baseboard management controller, characterized in that, Multiple KCS channels exist between the host system and the baseboard management controller, the baseboard management controller comprising: The acquisition module is used to acquire the attribute value of the host system at the current time in response to determining that a preset KCS channel closing instruction has been received and the control process has started, and to acquire the channel closing information stored in the memory of the baseboard management controller. The attribute value is used to indicate whether the host system has completed the power-on self-test process. The processing module is configured to, in response to determining that the attribute value is a first attribute value, determine the preset KCS channel from the plurality of KCS channels, wherein the first attribute value instructs the host system to complete the power-on self-test process; and The processing module is also used to close the preset KCS channel through the channel closing information and the control process.
18. A computer device, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store computer-readable instructions that, when read and executed by the one or more processors, implement the channel control method as described in any one of claims 1 to 16.
19. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-readable instructions that, when executed by one or more processors, implement the channel control method as described in any one of claims 1 to 16.
20. A computer program product, characterized in that, Includes computer-readable instructions that, when executed by one or more processors, implement the channel control method as described in any one of claims 1 to 16.
Citation Information
Patent Citations
System event read method and system
CN103488430A
Method and system for detecting starting state of baseplate management controller
CN104809044A
Communication fault recovery method and system, and related components
CN110413435A
Security vulnerability repairing method and mainboard management controller
CN114065224A
Information processing method, information processing device, electronic equipment and storage medium
CN114417301A