Device network wake-up control method, device, storage medium and program product
By performing preset interrupt triggering operations and callback function setting levels on the substrate management controller of the target device, the security vulnerabilities and insufficient control of PCIE devices in the existing network wake-up technology are solved, and precise control and security improvement of the network wake-up function are achieved.
Patent Information
- Application Number
- CN202411650054.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Existing wake-up technologies have security vulnerabilities, privacy issues and service availability issues, especially insufficient support for separate control of PCIE devices and immediate settings, resulting in security risks such as data breaches.
By sending a target control command to the substrate management controller of the target device, performing a preset interrupt trigger operation, triggering a system management interrupt, and setting the level of the target physical switch through the callback function to control the on and off of the network wake-up function.
Disable the wake-up function from the hardware level to improve the security of the device, avoid the risk of data leakage, reduce power consumption, and reduce costs.
Smart Images

Figure CN119172186B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a device network wake-up control method, device, storage medium and program product. Background Art
[0002] Wake On LAN (WOL, also known as remote wake-up) is a technology that allows a computer in shutdown or hibernation to be woken up via a network signal on a local area network (LAN). This technology relies on the collaboration between the computer's network card (network adapter) and the BIOS (Basic Input / Output System) on the motherboard. Wake-on-LAN via BIOS allows a computer in shutdown or hibernation to be woken up by sending a specific MagicPacket over the LAN, allowing administrators to remotely start the computer for maintenance, updates, or other necessary operations without having to physically access the computer directly.
[0003] However, since network wake-up is a method of controlling devices or systems through an Internet connection, and is usually used for remote management of devices, using network wake-up also involves some potential risks, especially in situations where anonymity and non-disclosure of identity are emphasized, such as: Security vulnerabilities: Network wake-up protocols and technologies may have security vulnerabilities, making it possible for criminals to invade the system; Privacy issues: When using network wake-up, the device or system may need to communicate with a server on the Internet, which may involve the theft or monitoring of personal information; Service availability issues: Network wake-up depends on Internet connection. If the Internet connection is unstable or disturbed, the network wake-up function may not be used normally. However, the current WOL function does not support the individual control of PCIE (peripheral component interconnect express, a high-speed serial computer expansion bus standard) devices, and does not support the immediate effect of system settings. Using WOL has potential security risks. Therefore, different users have different requirements for the use of WOL functions. Failure to consider the opening of this function and improper use may cause technical vulnerabilities that lead to data leakage and other problems.
[0004] It can be seen that how to improve the security of the device when using network wake-up is a problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a device network wake-up control method, device, storage medium and program product, which can turn on the network wake-up function when there is a need for network wake-up, and close the network wake-up port when it is not needed, thereby solving the security problem of the device when using network wake-up.
[0006] In order to solve the above technical problems, in a first aspect, the present invention provides a device network wake-up control method, comprising:
[0007] Sending a target control command to a baseboard management controller of a target device, so as to control the baseboard management controller to perform a preset interrupt triggering operation by using the target control command; the preset interrupt triggering operation is used to trigger a system management interrupt of the target device;
[0008] By executing a callback function corresponding to the system management interrupt, the level of the target physical switch in the target device is set;
[0009] A network wake-up function of the target device is controlled based on the level.
[0010] In some embodiments, before sending the pre-created target control command to the baseboard management controller of the target device, the method further includes:
[0011] Controlling the target device to perform a power-on self-test;
[0012] When the target device performs a power-on self-test, the system management interrupt of the target device is registered through the basic input and output system of the target device.
[0013] In some embodiments, registering the system management interrupt of the target device through the basic input and output system of the target device includes:
[0014] Configuring a corresponding interrupt vector or interrupt identifier for the system management interrupt;
[0015] The system management interrupt is maintained based on the interrupt vector or the interrupt identifier.
[0016] In some embodiments, sending a target control command to a baseboard management controller of the target device to control the baseboard management controller to perform a preset interrupt triggering operation using the target control command includes:
[0017] Sending a pre-created first intelligent platform management interface command to the baseboard management controller of the target device, so as to control the baseboard management controller to perform a preset interrupt triggering operation by using the first intelligent platform management interface command;
[0018] The preset interrupt triggering operation is that the baseboard management controller writes corresponding target data to a preset input / output port of the target device to trigger a system management interrupt of the target device.
[0019] In some embodiments, the preset input and output port is a system management interrupt port of the target device; correspondingly, the target data is a system management interrupt value; the baseboard management controller triggers the system management interrupt of the target device by writing the system management interrupt value to the system management interrupt port.
[0020] In some embodiments, the device network wake-up control method further includes:
[0021] Determining switch information of the target physical switch;
[0022] The switch information of the target physical switch is stored through a variable variable of a basic input / output system of the target device.
[0023] In some embodiments, the target physical switch is a physical switch of an interface slot on the target device for controlling a network wake-up function of the target device, and the switch information includes a unique identifier of the interface slot and a wake-up function switch state corresponding to the target physical switch.
[0024] In some embodiments, the step of executing a callback function corresponding to the system management interrupt to complete setting of a level of a target physical switch in the target device includes:
[0025] Executing the callback function corresponding to the system management interrupt, and acquiring return information of the system management interrupt according to a second intelligent platform management interface command of the original equipment manufacturer of the target device;
[0026] The level of the preset universal input / output port is set according to the returned information, so as to control the level of the target physical switch based on the level of the preset universal input / output port.
[0027] In some embodiments, after setting the level of the preset general purpose input / output port according to the returned information, the method further includes:
[0028] When it is detected that the level of the preset universal input / output port changes, the variable variable of the basic input / output system is synchronously updated.
[0029] In some embodiments, the device network wake-up control method further includes:
[0030] respectively setting the level of the target physical switch corresponding to each of the target devices;
[0031] Based on the level of the target physical switch corresponding to each of the target devices, the network wake-up function of each of the target devices is controlled separately.
[0032] In some embodiments, the device network wake-up control method further includes:
[0033] Determine the target device for which the network wake-up function needs to be enabled to obtain the device to be isolated;
[0034] A dedicated network environment is configured for the device to be isolated; wherein the dedicated network environment of the device to be isolated is isolated from the network environment of other target devices that do not need to enable the network wake-up function.
[0035] In some embodiments, the device network wake-up control method further includes:
[0036] Configure network wake-up permissions for preset users or preset target devices;
[0037] When a network wake-up request triggered by any user or any target device is obtained, whether the user or any target device has network wake-up permission is checked, and whether the user or any target device is allowed to trigger the network wake-up operation is determined according to the permission check result.
[0038] In a second aspect, the present invention discloses an electronic device, comprising:
[0039] Memory for storing computer programs;
[0040] The processor is used to execute the computer program to implement the steps of the aforementioned device network wake-up control method.
[0041] In a third aspect, the present invention discloses a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the aforementioned device network wake-up control method are implemented.
[0042] In a fourth aspect, the present invention discloses a computer program product, including a computer program / instruction, which implements the steps of the aforementioned device network wake-up control method when executed by a processor.
[0043] It can be seen from the above technical solution that the present invention can send a target control command to the baseboard management controller of the target device, so as to use the target control command to control the baseboard management controller to execute a preset interrupt trigger operation, which is used to trigger the system management interrupt of the target device, and in the process of the system management interrupt, by executing the callback function corresponding to the system management interrupt, complete the setting of the level of the target physical switch in the target device, and control the network wake-up function of the target device based on the level.
[0044] The beneficial effects of the present invention are as follows: by shutting down the physical function of the target physical switch at the basic input / output system level, the network wake-up function can be disabled at the hardware level. Therefore, if different users have different requirements for the use of the network wake-up function, the network wake-up function can be turned on when there is a need to use the network wake-up function, and the network wake-up port can be turned off when it is not needed, thereby avoiding the problem of technical loopholes that may cause data leakage when the function is not considered to be turned on and used improperly. At the same time, since the network wake-up function of the device can be turned off when there is no need for network wake-up on the device, it is helpful to reduce the power consumption of the device and reduce the cost. In addition, since the present invention can operate the hardware in the basic input / output system to disable the network wake-up function, even if the device is turned on, it cannot be woken up through the network, thereby ensuring user experience and security issues and improving the security of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flow chart of a device network wake-up control method provided by an embodiment of the present invention;
[0047] Figure 2 A schematic diagram of an SMI interrupt function provided by an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of SMI interrupt registration provided by an embodiment of the present invention;
[0049] Figure 4 A flow chart of a specific device network wake-up control method provided by an embodiment of the present invention;
[0050] Figure 5 A schematic diagram of an OEM IPMI command provided by an embodiment of the present invention;
[0051] Figure 6 A schematic diagram of a network card status viewing program provided by an embodiment of the present invention;
[0052] Figure 7 A schematic diagram of the meaning of a network wake-up character provided by an embodiment of the present invention;
[0053] Figure 8 A schematic diagram of a device network wake-up provided by an embodiment of the present invention;
[0054] Fig. 9A schematic diagram of network card information display provided by an embodiment of the present invention;
[0055] Fig.10 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0058] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0059] Network wake-up is usually used for remote management of devices. However, the current network wake-up function does not support individual control of PCIE devices. Therefore, for different users with inconsistent requirements for the use of WOL functions, it is not considered that turning on and improperly using this function may cause technical loopholes leading to data leakage and other potential security risks. The present invention can open or close the network wake-up port according to different network wake-up usage requirements, thereby avoiding the problem of technical loopholes leading to data leakage when the function is turned on and improperly used. In addition, since the hardware can be operated in the basic input and output system to disable the network wake-up function, even if the device is turned on, it cannot be woken up through the network, thereby improving the security of the device.
[0060] Next, a device network wake-up control method provided by an embodiment of the present invention is described in detail. Figure 1 A device network wake-up control method provided by an embodiment of the present invention includes:
[0061] Step S11: sending a target control command to a baseboard management controller of a target device, so as to control the baseboard management controller to execute a preset interrupt triggering operation by using the target control command; the preset interrupt triggering operation is used to trigger a system management interrupt of the target device.
[0062] It is understandable that this embodiment can be applied to the BIOS basic input and output system of the target device, and in a specific embodiment, the target device can be a PCIE device based on the high-speed serial computer expansion bus standard, so as to realize the control of the wake-up function of the PCIE device based on the BIOS system. It should also be pointed out that before sending a pre-created target control command to the baseboard management controller (BMC) of the target device to control the baseboard management controller to execute a preset interrupt trigger operation, such as Figure 2 As shown, first you need to register the SMI (System Management Interrupt) interrupt in the BIOS, which can control the target device to perform a power-on self-test, and register the target device's system management interrupt through the basic input and output system when the target device is powered on and self-tested. Figure 3 As shown, the BIOS registers the WOL interrupt during the POST (Power-On Self Test) process and uses the Software SMI interrupt to trigger the interrupt. It can be understood that when registering the WOL interrupt, the BIOS will register the WOL interrupt handler when the system starts up so as to trigger the corresponding operation when needed. This process usually involves associating the interrupt handler with the corresponding interrupt vector or identifier so that the system can correctly handle the WOL event. Therefore, when registering the system management interrupt of the target device, the corresponding interrupt vector or interrupt identifier can be configured for the system management interrupt so as to maintain the system management interrupt based on the interrupt vector or interrupt identifier.
[0063] After the SMI registration is completed, the first intelligent platform management interface command created in advance is sent to the baseboard management controller of the target device, so as to use the first intelligent platform management interface command to control the baseboard management controller to perform a preset interrupt trigger operation; wherein the preset interrupt trigger operation is that the baseboard management controller writes the corresponding target data to the preset input and output port of the target device to trigger the system management interrupt of the target device. wherein the preset input and output port is the system management interrupt port of the target device; correspondingly, the target data is the system management interrupt value; the baseboard management controller triggers the system management interrupt of the target device by writing the system management interrupt value to the system management interrupt port. it can be understood that based on the above steps, in this embodiment, the IO port (input / output, general input / output port) can be controlled by IPMI (Intelligent Platform Management Interface, intelligent platform management interface) command, that is, the IPMI command can be used to let the BMC trigger the action of SMI by writing the IO port, specifically, the IPMI command can be used to remotely control the BMC to perform specific operations, and in this embodiment, data can be written to the IO port to trigger the SMI interrupt. And because in this embodiment, the system uses Software SMI interrupt to trigger WOL interrupt, when the system needs to trigger an interrupt, the corresponding SMI value will be written to a specific SMI port, thereby triggering the system to enter SMI mode and execute the corresponding interrupt handler.
[0064] Through the above technical solution, when the system needs to trigger an interrupt, the corresponding value can be written to the IO port, and in this embodiment, the IPMI command is used to let the BMC write the IO port to realize the action of triggering the SMI. Since the value of the SoftwareSMI interrupt is unknown to the user, the user operation can be simplified and the system stability can be improved by encapsulating and controlling the IO port operation using IPMI commands. In addition, the underlying details can be hidden in this way, so that the user can trigger the required operation through high-level commands without knowing the specific SMI value. In other words, by encapsulating the IO port operation with IPMI commands, the remote control of the system interrupt and the simplified operation can be realized, while the system stability can be improved.
[0065] Step S12: completing the setting of the level of the target physical switch in the target device by executing the callback function corresponding to the system management interrupt.
[0066] In the process of system management interruption in this embodiment, the level of the target physical switch in the target device is set by executing the callback function corresponding to the system management interruption, so as to control the network wake-up function of the target device based on the above level.
[0067] Step S13: Controlling the network wake-up function of the target device based on the level.
[0068] It is understandable that the current WOL control method is to use the PowerManagement SstateCtl register of ACPI (Advanced Configuration and Power Management Interface), but this cannot control the switch of PCIE alone. Therefore, in this embodiment, the network wake-up function of the target device can be controlled based on the level of the target physical switch. In a specific embodiment, the WOL switch is controlled by controlling the WAKE# signal of PCIE, thereby enabling the WOL of the PCIE device alone. It can be understood that when the PCIE device enters the sleep state and the main power supply has stopped supplying power, the PCIE device uses the signal to submit a wake-up request to the processor system, so that the processor system re-supplies the main power supply to the PCIE device, and in the PCIE bus, the WAKE# signal is optional, so the mechanism of using the WAKE# signal to wake up the PCIE device requires hardware support for BIOS settings. In this embodiment, GPIO (General-purpose input / output) can be used to connect to the WAKE pin of the PCIE. Therefore, in this embodiment, a callback function corresponding to the system management interrupt is used to complete the setting of the level of the target physical switch WAKEpin in the target device, so as to control the network wake-up function of the target device based on the above level. Based on the above technical solution, since the WOL switch of PCIE can be controlled by PCIE pin, it can take effect immediately. However, when the server enters the system, it is impossible to directly operate the relevant registers. In this embodiment, SMI can be triggered to BIOS to execute the relevant driver program. First, the data is stored in BMC through IPMI, and the API interface (Application Programming Interface) left by the BIOS driver is used to trigger SMI to enter the BIOS real mode to read the WOL register set for PCIE, so as to achieve immediate effect under the system. In this way, considering that the server cannot directly operate the register after entering the system, in this embodiment, SMI can be triggered to BIOS to execute the relevant driver program, and then read the WOL register set for PCIE, so as to achieve the control of the WOL switch through PCIE pin, so that the network wake-up function can take effect immediately. At the same time, when the device does not need to wake up the network, the network wake-up function of the device is turned off, which helps to reduce the power consumption of the device and reduce the cost of daily maintenance of the device.
[0069] It should also be noted that the BIOS option setting switch is modified during the Post process, and a reboot is required to change the setting. In this way, the setting process can be optimized and the usability of the function can be improved. In addition, in this embodiment, the remote management and control function of the device network wake-up function can be realized through the communication mechanism between the BMC and the BIOS, so that the user can remotely operate the system hardware device, which improves the manageability and flexibility of the system. At the same time, by using IPMI command encapsulation and simplified operation, as well as the communication mechanism between the BMC and the BIOS, the stability and reliability of the system are improved, and the risk of security loopholes is reduced.
[0070] Based on the above technical solution, in this embodiment, the WOL can be physically turned on and off, and then the network wake-up function of each PCIE device can be controlled separately. Specifically, the function of the WOL switch can be controlled under the system, that is, the GPIO pin is physically set to turn on and off the WOL function to improve the system security. In order to further improve the security of the system when turning on WOL, in this embodiment, the target device that needs to turn on the network wake-up function can also be determined to obtain the device to be isolated, and a dedicated network environment can be configured for the device to be isolated; wherein the dedicated network environment of the device to be isolated is isolated from the network environment where other target devices that do not need to turn on the network wake-up function are located. In addition, network wake-up permissions can also be configured for preset users or preset target devices. When a network wake-up request triggered by any user or any target device is obtained, whether any user or any target device has network wake-up permissions is verified, and whether any user or any target device is allowed to trigger the network wake-up operation is determined based on the permission verification result. In this way, by isolating the device with the network wake-up function enabled from other networks, establishing an independent network environment, and limiting the propagation range of the network wake-up signal, it is helpful to reduce the intrusion path of potential attackers; at the same time, the wake-up authority of the device can be limited, and the network wake-up function can be specifically controlled. Only specific users or devices have the wake-up authority, and other users cannot trigger the wake-up operation, which can reduce potential security risks, thereby further preventing network attackers from using the wake-up function to access or manipulate the system without authorization. It should also be pointed out that in this embodiment, corresponding network security measures can also be established based on the above configuration of a dedicated network environment for the isolated device, including but not limited to firewalls, intrusion detection systems (IDS, intrusion detection system), intrusion prevention systems (IPS, Intrusion Prevention System), etc., to protect the network from malicious attacks and timely discover and prevent potential network attacks. In this way, not only a dedicated network environment is separately constructed for the device that currently needs to enable the network wake-up function, but also corresponding network security measures can be configured for the dedicated network environment, thereby further improving the security of the device that enables the network wake-up function.
[0071] Through the above technical solution, a method for turning off the WOL function of the device through IPMI can be provided in this embodiment, supporting the individual control of PCIE and BIOS Setup settings, and can be triggered by sending IPMI to achieve immediate effect in the system, ensuring user experience and security issues, that is, the user can turn on the network wake-up function when in use, and turn off the network wake-up port when not needed, preventing the network from being invaded through network protocol technology, and improving the security of the entire system. And the WOL function can be disabled from the BIOS hardware level to avoid problems caused by inconsistent functional usage requirements of WOL by different users. At the same time, since the disabling of the WOL function in this embodiment is to operate the hardware in the BIOS, even if the device is turned on, it cannot be woken up through the network, avoiding the problem that since WOL is a function of PCIE devices, many network cards support and enable this function by default, and the switch can be controlled even if this function is disabled, further improving the security of the device.
[0072] Based on the previous embodiment, it can be known that the present invention can open or close the network wake-up port according to different network wake-up usage requirements to control the network wake-up function of the device. Next, this embodiment will explain in detail the process of controlling the network wake-up function at the physical level. Figure 4 A specific device network wake-up control method provided by an embodiment of the present invention includes:
[0073] Step S21: sending a target control command to a baseboard management controller of a target device, so as to use the target control command to control the baseboard management controller to execute a preset interrupt triggering operation; the preset interrupt triggering operation is used to trigger a system management interrupt of the target device.
[0074] Step S22, executing the callback function corresponding to the system management interrupt, and obtaining the return information of the system management interrupt according to the second intelligent platform management interface command of the original equipment manufacturer of the target device, setting the level of the preset general input and output port according to the return information, so as to control the level of the target physical switch based on the level of the preset general input and output port, and controlling the network wake-up function of the target device based on the level.
[0075] In this embodiment, a callback function corresponding to the system management interrupt can be executed, and the return information of the system management interrupt can be obtained according to the second intelligent platform management interface command of the original equipment manufacturer (OEM) of the target device, and the level of the preset general input and output port can be set according to the return information to control the level of the target physical switch based on the level of the preset general input and output port, and control the network wake-up function of the target device based on the level. In a specific embodiment, if Figure 5 As shown, the return information of IPMI can be obtained through the OEM IPMI command in the SMI interrupt CallBack function. The OEM IPMI command can be designed as follows:
[0076] ipmitool raw 0x3a Byte0 Byte1 Byte2;
[0077] ipmitool raw 0x3a 0x01 0xFF 0xFF; turn off the WOL function;
[0078] ipmitool raw 0x3a 0x01 0xFF 0x0; Enable WOL function;
[0079] ipmitool raw 0x3a 0x02; read WOL settings and return the PCIE Wake pin status of each Slot of PCIE Wake data; where 0x3a oem command byte0: 0x01: write; 0x02: read, and the following two bytes represent the Wake_pin status of each Slot and the Slot.
[0080] In a specific implementation, this embodiment can provide a function for controlling PCIE Port Wake PinEnabled separately. Taking the control method of Hygon CPU GPIO as an example, the control of the network wake-up function of the PCIE device can be implemented based on the following function:
[0081] AmdCpmTableProtocolPtr->CommonFunction.SmnWrite32(AmdCpmTableProtocolPtr, SOCKET_SlotXX, DIE_SloXX, (UINT32) OemSmnGpio, (UINT32) (WOL_SLOTXX_PIN << 2), Value);
[0082] Among them, SOCKET_SLOTXX, DIE_SloXX, and WOL_SLOTXX_PIN represent the CPU (Central Processing Unit) and DIE (CPU core) where the GPIO used by PCIE is located, as well as the GPIO Pin used. In the BIOS, Variable is used to access the WOL switch information of each Slot. This information is transmitted through IPMI and BMC. Then, the BIOS sets the Wake_PIN level of each PCIE device by setting the GPIO level, so that the switch of the WOL function can be controlled separately. In this way, in this embodiment, by setting the GPIO level of the Wake Pin of each PCIE Slot, precise control of the wake-up function of the PCIE device is achieved, and users can flexibly configure the wake-up behavior of the device according to their needs.
[0083] In addition, in this embodiment, the switch information of the target physical switch can also be determined, and the switch information of the target physical switch can be saved through the variable variables of the basic input and output system. It should be noted that the target physical switch is a physical switch of the interface slot on the target device for controlling the network wake-up function of the target device; accordingly, the switch information includes the unique identifier of the interface slot and the wake-up function switch state corresponding to the target physical switch. In a specific embodiment, the target physical switch can be set to the preset wake-up pin WakePin of the interface slot on the target device, and the corresponding switch information includes the unique identifier of the interface slot and the wake-up function switch state corresponding to the preset wake-up pin. It can be understood that the Variable variable in the BIOS is used to access the WOL switch information. Specifically, the BIOS saves the WOL switch information of each Slot in the memory through the Variable. This information may include the unique identifier of each Slot and the corresponding WOL switch state. In this embodiment, by reading and writing these Variables, the BIOS can be used to manage and control the WOL function of each PCIE device. And it can be understood that each Variable corresponds to an option of the BIOS. Specifically, the WOL function can be controlled by setting the GPIO level, that is, the BIOS controls the Wake Pin level of each PCIE device by setting the GPIO level, so that the switch of the WOL function can be controlled separately. In other words, by adjusting the state of GPIO, the wake-up function of the PCIE device can be controlled.
[0084] In a specific implementation, after the level of the preset general input / output port is set according to the return information, when the level of the preset general input / output port is monitored to change, the variable variable of the basic input / output system is synchronously updated to ensure that the option information in the BIOS Setup is synchronously updated. At the same time, in this embodiment, the BIOS supports the option of setting the WOL of each PCIE device individually, so the level of the target physical switch corresponding to each target device can be set respectively, and based on the level of the target physical switch corresponding to each target device, the network wake-up function of each target device is individually controlled. Based on the above technical solution, in this embodiment, the BMC can receive the control function sent by the BIOS to write the IO Port of the CPU to trigger the SMI interrupt, and the process of obtaining the return information through the IPMI command of the OEM in the CallBack function of the SMI interrupt, and then according to the setting value returned by the BMC, the BIOS executes the CallBack function to set the GPIO level of the Wake Pin of each PCIE Slot, and synchronously updates it to the option variable value of the BIOS to ensure that the option information in the BIOS Setup is synchronously updated, and at the same time, the BIOS supports the option of setting the WOL of each PCIE device individually, and provides a method for the setting to take effect immediately under IPMI to optimize the user experience. Through the above technical solution, in this embodiment, the GPIO level of the Wake Pin of each PCIE Slot can be set to achieve precise control of the wake-up function of the PCIE device, and by synchronously updating the set value to the option variable of the BIOS, it can ensure that the option information under the BIOS Setup is consistent with the actual setting, thereby improving the accuracy and reliability of the system configuration. At the same time, a switch for controlling the PCIE Port WOL separately is provided to improve flexibility, and a method for setting to take effect immediately under IPMI is provided, so that users can apply the settings immediately without waiting for the restart action, thereby optimizing the user experience and improving the convenience and efficiency of operation.
[0085] It should be noted that the network wake-up control method in this embodiment can make the device wake up regularly in the background to perform data synchronization and cloud service operations, which helps to ensure timely update and backup of data and provide more convenience for users. In this embodiment, the log of turning on or off the network wake-up function of the target device can also be recorded and uploaded to the cloud server. The above log can include changes in the values corresponding to the SMI port and GPIO port, changes in the level corresponding to the physical switch, changes in the value of the option variable of the BIOS, etc., and based on the previous real-time example, the above log can also record the network wake-up request sent by the user or other devices, etc. In this way, by controlling the network wake-up function of the target device and recording the parameter change information generated when the network wake-up function is triggered to the cloud server, it helps to ensure timely update and backup of data, and to find relevant information in time for adjustment when the network wake-up error of the target device occurs in the future, or to trace the source in time when the target device is attacked, which further improves the security of the device.
[0086] For a more specific processing procedure of the above step S21, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.
[0087] Through the above technical solution, in this embodiment, a pre-created target control command can be sent to the baseboard management controller of the target device, so as to use the target control command to control the baseboard management controller to execute a preset interrupt trigger operation to trigger the system management interrupt of the target device, and then execute the callback function corresponding to the system management interrupt, and obtain the return information of the system management interrupt according to the intelligent platform management interface command of the target device, and set the level of the preset general input and output port according to the return information, so as to control the level of the target physical switch based on the level of the preset general input and output port, and control the network wake-up function of the target device based on the level. In this way, the BIOS saves the WOL switch information of each Slot in the memory through Variable, and by reading and writing these Variables, the BIOS can manage and control the WOL function of each PCIE device. Specifically, the Wake Pin level of each PCIE device can be controlled by setting the level of GPIO, so that the switch of the WOL function can be controlled separately, and the wake-up function of the PCIE device can be controlled by adjusting the state of GPIO.
[0088] In a specific embodiment, Figures 6 to 9As shown in the figure, after booting up and entering the OS normally, use Ipconfig to check the MAC (Media Access Control address) and port name of the network port (en02 MAC:00:a0:c9:00:00:01), and use the ethtool command to check whether the network card has wake-on enabled by the port name, where G means enabled and D means disabled. Figure 6 As shown, a specific viewing result is as follows Figure 6 The content in text box 1 is as follows:
[0089] Ethtool -s en02 wol g;
[0090] And the current network wake-up state of a target device is as follows Figure 6 The content in text box 2 is as follows:
[0091] Wake-on: g;
[0092] in, Figure 6 The meaning of the characters in wake-on in text box 2 is as follows Figure 7 As shown. At this time, the network wake-up function of the device is turned on, and the PowerOff shutdown is performed. When the current network and the target host are in the same LAN, as shown Figure 8 As shown, use magpac to send a magic packet to wake up. At this time, Fig. 9 As shown, when the WOL function is physically disabled, the software method cannot be used to set it to be enabled, and the network card under the OS does not display the WOL information. Based on the above embodiments, the present invention provides a setting method for remote management and control, precise control of the PCIE device wake-up function, synchronous update of option information, and immediate effect, providing users with a more convenient, flexible and reliable system management and configuration experience, and providing a method for physically turning on and off WOL under the system, reducing the security risks brought by the use of WOL, and can support the functions of disabling each device individually and turning off WOL for all devices, while supporting a method for setting to take effect immediately under the system, turning on and off the PCIE WOL function of any PCIE device at any time, and optimizing the user experience.
[0093] Furthermore, an embodiment of the present invention also discloses an electronic device, Fig.10It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of the present invention. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the device network wake-up control method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0094] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present invention, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0095] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0096] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the device network wake-up control method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0097] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed device network wake-up control method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0098] Furthermore, the present invention also discloses a computer program product, including a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the aforementioned disclosed device network wake-up control method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0099] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0100] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0101] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0102] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0103] The technical solution provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A device network wake-up control method, characterized in that: include: Sending a target control command to a baseboard management controller of a target device, so as to control the baseboard management controller to perform a preset interrupt triggering operation by using the target control command; The preset interrupt triggering operation is used to trigger a system management interrupt of the target device; By executing a callback function corresponding to the system management interrupt, the level of the target physical switch in the target device is set; Controlling a network wake-up function of the target device based on the level; The step of executing a callback function corresponding to the system management interrupt to complete setting of a level of a target physical switch in the target device includes: Executing the callback function corresponding to the system management interrupt, and acquiring return information of the system management interrupt according to a second intelligent platform management interface command of the original equipment manufacturer of the target device; The level of the preset universal input / output port is set according to the returned information, so as to control the level of the target physical switch based on the level of the preset universal input / output port.
2. The device network wake-up control method according to claim 1, characterized in that: Before sending the target control command to the baseboard management controller of the target device, the method further includes: Controlling the target device to perform a power-on self-test; When the target device performs a power-on self-test, the system management interrupt of the target device is registered through the basic input and output system of the target device.
3. The device network wake-up control method according to claim 2, characterized in that: The step of registering the system management interrupt of the target device through the basic input / output system of the target device comprises: Configuring a corresponding interrupt vector or interrupt identifier for the system management interrupt; The system management interrupt is maintained based on the interrupt vector or the interrupt identifier.
4. The device network wake-up control method according to claim 1, characterized in that: The sending of a target control command to a baseboard management controller of a target device, so as to control the baseboard management controller to perform a preset interrupt triggering operation by using the target control command, comprises: Sending a pre-created first intelligent platform management interface command to the baseboard management controller of the target device, so as to control the baseboard management controller to perform a preset interrupt triggering operation by using the first intelligent platform management interface command; The preset interrupt triggering operation is that the baseboard management controller writes corresponding target data to a preset input / output port of the target device to trigger a system management interrupt of the target device.
5. The device network wake-up control method according to claim 4, characterized in that: The preset input and output port is the system management interrupt port of the target device; correspondingly, the target data is a system management interrupt value; the baseboard management controller triggers the system management interrupt of the target device by writing the system management interrupt value to the system management interrupt port.
6. The device network wake-up control method according to claim 1, characterized in that: Also includes: Determining switch information of the target physical switch; The switch information of the target physical switch is stored through a variable variable of a basic input / output system of the target device.
7. The device network wake-up control method according to claim 6, characterized in that: The target physical switch is a physical switch of an interface slot on the target device for controlling a network wake-up function of the target device, and the switch information includes a unique identifier of the interface slot and a wake-up function switch state corresponding to the target physical switch.
8. The device network wake-up control method according to claim 7, characterized in that: After setting the level of the preset universal input / output port according to the returned information, the method further includes: When it is detected that the level of the preset universal input / output port changes, the variable variable of the basic input / output system is synchronously updated.
9. The device network wake-up control method according to claim 7, characterized in that: Also includes: respectively setting the level of the target physical switch corresponding to each of the target devices; Based on the level of the target physical switch corresponding to each of the target devices, the network wake-up function of each of the target devices is controlled separately.
10. The device network wake-up control method according to any one of claims 1 to 9, characterized in that: Also includes: Determine the target device for which the network wake-up function needs to be enabled to obtain the device to be isolated; A dedicated network environment is configured for the device to be isolated; wherein the dedicated network environment of the device to be isolated is isolated from the network environment of other target devices that do not need to enable the network wake-up function.
11. The device network wake-up control method according to claim 10, characterized in that: Also includes: Configure network wake-up permissions for preset users or preset target devices; When a network wake-up request triggered by any user or any target device is obtained, whether the user or any target device has network wake-up permission is checked, and whether the user or any target device is allowed to trigger the network wake-up operation is determined according to the permission check result.
12. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the device network wake-up control method as described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device network wake-up control method according to any one of claims 1 to 11 are implemented.
14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the device network wake-up control method described in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Triggering method and device for processor interruption
CN109918251A
Network wake up system with protection function
US20130073876A1