Pop-up hot plug control method and device, medium and program product
By setting up the power management method of the server under the Windows operating system to direct power management of the operating system, and using the ACPI protocol and OSPM driver, pop-up hot plugging of PCI devices except USB flash drives is achieved, solving the problem of hot plugging of PCI devices The lack of the pull-out function improves management efficiency and reduces operation and maintenance costs.
Patent Information
- Application Number
- CN202411481705.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2024-11-22
AI Technical Summary
The Windows operating system cannot support pop-up hot-swap function of other types of PCI devices except for U disk and U disk interface NVME hard disk, resulting in the problem of not being able to dynamically manage and reduce energy consumption in the server.
By setting the server's power management method to the operating system's direct power management method, obtain the root port device connection information of the central processor, determine the target device that supports pop-up hot-swap, and control it to hot-removal, using ACPI protocol and OSPM Drivers implement hot-swap management of PCI devices.
Dynamic management of PCI devices can be achieved without physical disassembly of hardware, improves the device's hot-swap capability, saves manpower operation and maintenance costs, and is suitable for user habits under the Windows operating system.
Smart Images

Figure CN119003016A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hot plugging technology, and in particular to a control method, equipment, medium and program product of pop-up hot plugging. Background Art
[0002] In Windows operating system, people are used to the pop-up hot-swap function. For example, when a USB flash drive or a NVME (Non Volatile Memory Express) hard drive with a USB flash drive interface is inserted into a server, the server will use the pop-up hot-swap function to remind. However, for other types of PCI (Peripheral Component Interconnect) devices other than USB flash drives and NVME hard drives with USB flash drives interface, some users, especially those at server terminals, also want to implement pop-up hot-swap of other types of PCI devices. Assume that there are multiple network cards or multiple RAID (Redundant Array of Independent Disks) cards with PCI interfaces in a server. Because the server itself is in a data center or is far away, it is impossible to physically disassemble the PCI device. At this time, if the PCI device can be hot-swapped through pop-up hot-swap, it can effectively implement the process of hot-plugging unused or redundant devices, thereby effectively reducing the energy consumption of the server. However, the current Windows operating system does not support the pop-up hot-swap function of other types of PCI devices.
[0003] It can be seen that how to implement the pop-up hot-swap function of other types of PCI devices except USB flash drives and NVME hard drives with USB flash drive interfaces under the Windows operating system is a problem that needs to be solved by those skilled in the art. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a control method, device, medium and program product for pop-up hot plugging, which can solve the technical problem of how to implement the pop-up hot plugging function of other types of PCI devices except USB flash drives and NVME hard drives with USB flash drive interfaces under the Windows operating system.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a control method for pop-up hot plugging, comprising: Set the server's power management mode to the operating system direct power management mode; Obtaining device connection information of each root port of the loaded central processing unit; wherein the device connection information includes whether the slot to which the root port is connected supports hot plugging and the power management mode of the device set on the slot; Determine, according to the device connection information, a target device that needs to support pop-up hot plugging among all devices connected to the slot, and control the display of the server to display; wherein the power management mode of the target device is the direct power management mode of the operating system; Determine the target device that needs to be hot-plugged, and control the ejection of the target device that needs to be hot-plugged.
[0006] On the one hand, the power management mode of the server is set to the direct power management mode of the operating system, including: when the server enters the driver execution environment stage, the power management mode of the server is set to the direct power management mode of the operating system.
[0007] On the one hand, before obtaining the device connection information of each root port of the loaded CPU, it also includes: A description file for configuring a differentiated system description table using the Advanced Configuration and Power Interface protocol for all root ports of the central processor; After the power management mode of the server is set, loading the description file; The device connection information of each root port of the loaded central processing unit is obtained, including: obtaining the device connection information of each root port from the loaded description file.
[0008] On the one hand, the description file includes: the location information of the central processing unit in the server, the location information of the root port of the central processing unit, the correspondence between the slot where the device is set and the root port, the power management method of the device set on the slot, the name of the device set on the slot, and the function identifier of whether the slot supports hot plugging.
[0009] On the one hand, determining a target device that needs to support pop-up hot plugging among all devices connected to the slot according to the device connection information includes: Determine the value of the preset register according to the description file; wherein the value of the preset register is a function identifier of whether the slot in the description file supports hot plugging; A target device that needs to support pop-up hot plugging among all devices connected to the slot is determined based on the value assigned to the preset register.
[0010] On the one hand, the display of the server is controlled to display, including: the display of the server is controlled to display the device names of all target devices through a pop-up hot plug function list.
[0011] On the one hand, the method further includes: when a target device has been hot-plugged, deleting information of the target device that has been hot-plugged in the pop-up hot-plug function list.
[0012] On the one hand, determining the target device that needs to be hot-plugged includes: when a user selection instruction is received, determining the target device that needs to be hot-plugged based on the user selection instruction.
[0013] On the one hand, before the target device that needs to be hot-unplugged is ejected, it also includes: Determine whether the target device to be hot-plugged is in use; If not, the control ejects the target device that needs to be hot-plugged.
[0014] On the one hand, controlling the ejection of the target device that needs to be hot-plugged includes: calling an EJ0 control method to eject the target device that needs to be hot-plugged.
[0015] On the one hand, the method also includes: if the target device to be hot-plugged is in use, a prompt operation is performed to prompt that the device cannot be ejected.
[0016] On the one hand, it also includes: If the target device to be hot-plugged is in use, then it is detected whether the target device to be hot-plugged is stopped; If it is detected that the target device that needs to be hot-plugged is no longer in use, the target device that needs to be hot-plugged is controlled to be ejected.
[0017] To solve the above technical problems, an embodiment of the present invention further provides an electronic device, including: Memory for storing computer programs; The processor is used to execute the computer program to implement the steps of the control method of pop-up hot plug as described above.
[0018] To solve the above technical problem, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method for pop-up hot plugging as described above are implemented.
[0019] To solve the above technical problem, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the control method of pop-up hot plugging as described above when executed by a processor.
[0020] It can be seen from the above technical solution that by setting the power management mode of the server to the direct power management mode of the operating system, and loading the device connection information of each root port at the same time, the device connection information includes whether the slot connected to the root port supports hot plugging and the power management mode of the device set on the slot, and the power management mode of the target device is the direct power management mode of the operating system, when the connected device of the root port is the target device, the operating system can manage the target device after loading its corresponding device connection information, and realize the pop-up hot plug management of the target device driven by the direct power management mode of the operating system. The beneficial effect of the present invention is that the dynamic pop-up management of the target device can be realized without changing the physical hardware of the server, which improves the hot plug capability of the device and saves the manpower operation and maintenance cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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.
[0022] Figure 1 A schematic flow chart of a pop-up hot-swap control method provided by an embodiment of the present invention; Figure 2 A schematic diagram of the mainboard structure of a server provided in an embodiment of the present invention; Figure 3 A schematic flow chart of another pop-up hot-swap control method provided by an embodiment of the present invention; Figure 4 A swim lane diagram of a pop-up hot-swap control method provided by an embodiment of the present invention; Figure 5 A schematic diagram of a pop-up hot-swap function list provided by an embodiment of the present invention; Figure 6 A schematic diagram of another pop-up hot-swap function list provided by an embodiment of the present invention; Figure 7 A schematic diagram of a pop-up window prompting a device that cannot be popped up provided by an embodiment of the present invention; Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] 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 protection scope of the present invention.
[0024] 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.
[0025] 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.
[0026] Next, a control method for pop-up hot plugging provided by an embodiment of the present invention is described in detail. Figure 1 As shown, Figure 1 A flow chart of a pop-up hot-swap control method provided by an embodiment of the present invention; the pop-up hot-swap control method comprises:
[0027] S11: Set the power management mode of the server to the operating system direct power management mode.
[0028] In order to enable the PCI device to implement the pop-up hot-swap function under the Windows operating system, the present invention sets the server's power management mode to the OSPM (Operating System-directed Power Management) power management mode. OSPM is an operating system-led power management mode that can use global information to optimize system behavior with OS (Operating System) as the core to implement power management. In this case, the power management process will be transferred to the operating system, and ACPI (Advanced Configuration and Power Management Interface) will be used between the operating system and the hardware to implement the operating system's hardware management of the connected device. Therefore, under this power management mode, the operating system can directly manage the device currently connected to the server's central processor, thereby implementing hot-swap control of the connected PCI device.
[0029] It is not difficult to understand that setting the power management mode of the server to the operating system direct power management mode is specifically done by entering the BIOS (Basic Input Output System), then finding the power management setting option in the BIOS, and then setting the power management mode therein to the OSPM mode. This application does not make any special restrictions on the specific process of setting the power management mode.
[0030] S12: Obtain device connection information of each root port of the loaded central processing unit; wherein the device connection information includes whether the slot to which the root port is connected supports hot plugging and a power management mode of the device set on the slot.
[0031] It is understandable that, in combination with the OSPM functional module in the server's OSPM power management process, in order to realize hot-plug management and control of the PCI devices currently connected to the server, it is also necessary to determine the specific setting location and other information of each device connected to the server to achieve accurate management of each device. At the same time, not all devices connected to the server need to support hot-plugging. Some devices may always remain connected to the server and do not require hot-plugging. The operating system needs to obtain these device connection information. After obtaining the device connection information of each device, the operating system can further manage these devices and realize the hot-plugging process of some of them.
[0032] It is not difficult to understand that the connection between the device and the server is actually achieved by inserting it into the slot connected to the root port of the central processing unit. The slot (PCIE bandwidth slot identifier) slot is a physical connector. The device is inserted into the slot slot. The slot slot itself is connected to the root port of the central processing unit. The root port is used to manage the data transmission from the CPU (Central Processing Unit) to the PCI device. There are many options for the number of slots under a root port and the setting method. You can set only one slot connected to the root port, or you can set multiple levels or multiple slots to connect to multiple devices. Therefore, if a device connected to a server has a need to implement hot-plugging, the slot where it is located supports hot-plugging, and whether the slot connected to the root port in the corresponding device connection information supports hot-plugging will be defined as the slot supports hot-plugging. For each root port, a device connection may be set on the slot to which it is connected, so the operating system needs to obtain the device connection information of all root ports of all central processing units of the server.
[0033] It should be noted that before the server is started, the operator will complete the device connection. Therefore, when the server is started, the BIOS will load the device connection information. Therefore, the operating system only needs to obtain the device connection information of each root port of the loaded central processor from the BIOS. After all devices are mounted, the operating system can obtain the device connection information. The mounting of the device refers to linking the PCI device on the physical PCI link. The PCI device can be identified and viewed in the BIOS interface or the operating system, so that it can be confirmed whether all the devices to be used have been mounted.
[0034] S13: Determine the target device that needs to support pop-up hot plugging among all the devices connected to the slot according to the device connection information, and control the display of the server to display; wherein the power management mode of the target device is the direct power management mode of the operating system.
[0035] It is not difficult to understand that when the slot connected to the root port supports hot plugging, the PCI device set on the slot is the target device that needs to support pop-up hot plugging. Therefore, after obtaining the device connection information, the operating system can directly determine which connected devices are target devices that need to support pop-up hot plugging based on the device connection information. In order to facilitate the management of hot-plug devices and to facilitate users to indicate devices that need to be hot-plugged, the operating system can control the server's display to display the target devices, and users can directly select the device that needs to be hot-plugged from the displayed target devices.
[0036] It should be noted that at this time the operating system is in OSPM power management mode, so the OSPM driver will take over the device connection information. At this time, the operating system needs to use the OSPM driver to manage the target device that needs to support pop-up hot plugging. Only when the power management mode of the device is also the OSPM power management mode, the operating system can control the power state of the device through the OSPM driver. Therefore, the power management mode of the target device must be the operating system direct power management mode. In this way, the operating system can manage and control the power of the target device whose power management mode is also the OSPM power management mode after obtaining the device connection information, thereby realizing hot plug control of the target device using the OSPM power management mode. Therefore, when the operating system obtains the device connection information, it also needs to obtain the power management mode of the device set on the slot. This application does not make any special restrictions on the power management mode of other devices connected to the server. It can be distinguished from the OSPM power management mode and can be set and adjusted according to the actual application requirements and functional requirements of the device.
[0037] S14: Determine the target device that needs to be hot-plugged, and control the target device that needs to be hot-plugged to be ejected.
[0038] It is understandable that the user can determine which target devices need to be hot-plugged according to application requirements and actual conditions, and then control the target devices that need to be hot-plugged to pop up through the operating system, thereby realizing the pop-up hot-plugging process of a target device under the Windows operating system.
[0039] As a specific embodiment, when the device connection information is implemented through the description file of the DSDT (Differentiated System Description Table) of the ACPI protocol, under the Windows operating system, the OSPM driver in the Windows operating system will take over the description file of the DSDT table transmitted by the ACPI protocol, thereby obtaining the hot-plug function setting information of the slot corresponding to the PCI device, thereby displaying the device hot-plug function prompt information of all PCI slots in a pop-up hot-plug function list. When the user does not need to use a certain target device, he or she can choose to pop up the target device; if the target device is currently in use, a prompt that the device cannot be ejected will pop up. At this point, the PCI device hot-plug function under the Windows system has been fully realized.
[0040] In combination with the OSPM function module under the operating system, the present invention supports the realization of the hot-swap function by performing OSPM management on the slots under each Root port of the CPU in the BIOS, and supports OSPM management of the slots corresponding to each PCI device and its corresponding Root port in the ACPI protocol, so as to realize the function of the pop-up PCI device under the Windows system. At the same time, it can also be expanded according to this function, that is, according to the actual configuration requirements of the server motherboard, it is clear which CPU Root ports need to support the pop-up hot-swap function under the Windows system and which do not need to support the pop-up hot-swap function under the Windows system.
[0041] It should be noted that, for a server, there may be multiple CPUs, and for each CPU, there are multiple Root ports. In actual application, in order to reduce workload and avoid misoperation, and also to ensure that non-hot-pluggable PCI devices can continue to be used normally, it is not necessary for each Root port to support the pop-up hot-pluggable function. Only some of the Root ports can be determined as the connection points of the target devices that support pop-up hot-pluggable. Therefore, it is necessary to first clarify the hot-pluggable function support of the Root ports of all CPUs according to the actual application of the server, determine whether each specific Root port needs to support the pop-up hot-pluggable function under the system, and clarify which Root ports are the Root ports that support the pop-up hot-pluggable function, so as to clarify the Root port numbers that can be connected to the devices that support the pop-up hot-pluggable function under the Windows system, that is, to confirm which Root ports support the connection of these devices that need to meet the pop-up hot-pluggable function. After confirming the Root port number that needs to support pop-up hot plugging of PCI devices under the Windows operating system, when connecting the device, it is necessary to set the PCI device that needs to meet the pop-up hot plug function on the slot connected to these confirmed Root port ports, or by mounting the Slot slot number corresponding to the PCI device to these confirmed Root port ports, finally ensure that the physical PCI device is linked to these confirmed Root port ports, so that the pop-up hot plugging of these PCI devices can be realized through the Windows operating system later. The specific types and implementation methods of servers, CPUs, root ports and slots are not specifically limited in this application. The slots include PCIEx1 slots with a theoretical maximum bandwidth of 1GB / s, PCIEx4 slots with a theoretical maximum bandwidth of 4GB / s, PCIEx8 slots with a theoretical maximum bandwidth of 8GB / s, PCIEx16 slots with a theoretical maximum bandwidth of 16GB / s, etc. Other types of PCI devices include PCI network cards / OCP (OpenCompute Project Network Card) network cards, PCI RAID cards and other devices, which are not specifically limited in this application.
[0042] The invention realizes a method for supporting hot plugging of PCI devices in Windows system. The method mainly defines the location information of PCI devices, including but not limited to the CPU location number, the BDF number (Bus Number, Device Number, Function Number) of PCI devices, the RootPort number to which the Slot of PCI devices belongs, the power management mode of PCI devices, the hot plugging register value setting of PCI devices, the PCI device model, etc., in a unified manner in a description file of a DSDT table of an ACPI protocol through an OSPM management mode under Windows system. Meanwhile, the power management mode of PCI devices of a BIOS device is managed in an OSPM mode. During the power-on startup process of a server, the BIOS sets the power management mode of the server to an OSPM management mode through a DXE stage and loads the DSDT table of the ACPI protocol, thereby setting and supporting the pop-up hot plugging mode of the PCI devices under Windows. After the BIOS startup is completed and the operating system is entered, the pop-up hot plugging function of the PCI devices is managed through an OSPM management module of the Windows operating system, and prompts are given as to whether the PCI devices in normal use can be normally popped up. The key point is that the BIOS needs to set the server's power management mode to OSPM management mode. At the same time, the parameter information of the PCI device must be obtained by loading the DSDT table of the ACPI protocol. Only then can the OSPM driver be used under the Windows operating system to implement pop-up hot-swap management of the PCI device.
[0043] The traditional hot-swap solution is to achieve hot-swap by reserving the memory resources of the device, and can only support the hot-swap function of NVME hard disks, but cannot achieve the hot-swap function of PCI devices. If the hot-swap function of this PCI device is to be achieved, it is necessary to physically design a key or button to control the power supply of the device. The implementation method is relatively cumbersome, and additional hardware design is required to achieve hot-swap of PCI devices. The present invention can achieve the function of pop-up hot-swap PCI devices without changing the hardware, and is more suitable for pop-up user habits under the Windows operating system. At the same time, there is no need to change the physical hardware of the server to achieve dynamic pop-up management of PCI devices, thereby improving the hot-swap capability of PCI / PCIE (peripheral component interconnect express) devices and saving manpower and maintenance costs.
[0044] As a specific embodiment, see Figure 2 As shown, Figure 2A schematic diagram of the mainboard structure of a server provided in an embodiment of the present invention; the server includes two central processors, CPU0 and CPU1, which are interconnected through CCIX (Cache Coherent Interconnect for Accelerators) protocol, UPI (Ultra Path Interconnect), and GMI (Global Memory Interconnect), and the two CPUs are mutually redundant to ensure the reliable operation of the server. At the same time, the BMC (Baseboard Management Controller) of the server is connected to the CPU through LPC (Low pin count Bus) and PCI, and the BIOS is connected to the CPU through LPC, SPI (Serial Peripheral Interface), and QSPI (Queued SPI). CPU0 is connected to slot0, slot1 and PCI Switch chip through PCI, and PCI network card 1 (BDF number is B1:D1:F0), PCI network card 2 (BDF number is B1:D2:F0) and PCI network card 3 (BDF number is B1:D3:F0) are connected through the PCI Switch chip. At the same time, the AER (Advanced Error Reporting) function is set to be disabled for PCI devices. CPU0 is connected to slot2 through PCI, and is also connected to two PCI devices: PCI RAID card 1 (BDF number is B2:D1:F0) and PCI RAID card 1 (BDF number is B2:D2:F0).
[0045] The present invention analyzes the management mechanism of OSPM, and when the BIOS is started, the power management function of the server is handed over to the OSPM driver of the Windows operating system for management. At the same time, a DSDT table is loaded through an ACPI protocol in the startup phase of the BIOS, and in a description file of the DSDT table, the position information of the CPU, the position information of the Root port, the position information of the ROOT port where the slot number of the PCI device is located are defined, the BDF number corresponding to the Slot number of the PCI device is defined, the power management mode of the PCI Slot slot device is defined, and the hot plug function of the PCI slot is defined, so as to realize the hot plug management function of the PCI device under the Windows system. The whole method has strong replicability and scalability. Even if there are many PCI devices in the whole server system, the dynamic management function of PCI devices under the operating system can be realized without manual physical disassembly when they are not needed or need to be isolated. It not only reduces the operation and maintenance cost of the server in the data center, but also improves the energy efficiency of PCI device management, solves the problem that the hot-plug function of other PCI devices cannot be supported except the traditional Hotplug function supporting the NVME hot-plug function, but also improves the work efficiency of users, ensures the reliability of the server, and provides great convenience and beneficial measures for the stability and security of the server, the operation and maintenance of the data center and the service life of the whole server.
[0046] See also Figure 3 As shown, Figure 3 A flow chart of another pop-up hot-swap control method provided by an embodiment of the present invention; see Figure 4 As shown, Figure 4 A swimlane diagram of a pop-up hot-swap control method provided by an embodiment of the present invention, in which the BIOS and operating system of the server participate simultaneously in the entire control process; on the one hand, the power management mode of the server is set to the direct power management mode of the operating system, including: when the server enters the driver execution environment stage, the power management mode of the server is set to the direct power management mode of the operating system.
[0047] It is not difficult to understand that the power management mode of the server is generally set during the server initialization process. Considering that during the server initialization process, the BIOS has enough memory to use in the DXE stage, and can complete a large amount of driver loading and initialization work, the power management mode can be set at this stage. Therefore, when the server starts, the BIOS can set the server's power management mode to OSPM management mode in the DXE stage (driver execution environment). After the setting is completed, continue to start and load the detailed definition of the Slot information of the PCI device in the DSDT table of the ACPI protocol. After the BIOS is started, it is loaded into the Windows operating system.
[0048] Specifically, the server power management mode setting work can be completed through BIOS in the DXE stage. After BIOS completes the power management mode setting, after BIOS boots up and enters the Windows operating system, the Windows operating system can directly use the OSPM driver to manage and control the target device. Ensure that the Windows operating system can directly work in the OSPM power management mode to avoid entering other power management processes, thereby improving the accuracy and reliability of the entire pop-up hot-swap control process.
[0049] On the one hand, before obtaining the device connection information of each root port of the loaded CPU, it also includes: A description file for configuring a differentiated system description table using the Advanced Configuration and Power Interface protocol for all root ports of the central processor; After the server's power management mode is set, load the description file; The device connection information of each root port of the loaded central processing unit is obtained, including: obtaining the device connection information of each root port from the loaded description file.
[0050] It is understandable that the operating system needs to obtain the device connection information of the device to determine whether each device needs to be managed by pop-up hot plug. On the basis of the server adopting the OSPM power management method, the description file of the DSDT of the ACPI protocol can be used to implement the process of obtaining the device connection information. DSDT is the main table containing most of the hardware information. Before the server is started, the description file of the DSDT of the ACPI protocol is configured in advance for all the root ports of each central processor in the server. When there is a device setting on the slot under the root port, the device connection information of the device can be defined in the description file. Finally, after all the PCI devices under the Root port are mounted, the description file of the DSDT of the ACPI protocol is mounted under this Root port, and the description file will contain the device connection information of the devices set on each slot under the Root port. At this time, the operating system can obtain the device connection information through the description file.
[0051] It should be noted that after the server is started, the operating system needs to obtain the description file to obtain the device connection information. Therefore, after the BIOS completes the setting of the server's power management mode in the DXE stage, the description file can be loaded into the server through the BIOS. After the BIOS is started and enters the Windows operating system, the Windows operating system can directly take over the description file through the OSPM driver, thereby realizing the process of obtaining the device connection information of each device.
[0052] Specifically, the OSPM power management method itself also needs to be combined with the ACPI protocol to implement power management. Therefore, on this basis, the DSDT description file of the ACPI protocol can be directly used to obtain device connection information. The description file is first loaded through the BIOS, and then directly taken over by the operating system, which saves the preparation time after the server is started and improves the work efficiency of the entire pop-up hot-swap control method.
[0053] On the one hand, the description file includes: the location information of the central processing unit in the server, the location information of the root port of the central processing unit, the correspondence between the slot where the device is set and the root port, the power management method of the device set on the slot, the name of the device set on the slot, and the function identifier of whether the slot supports hot plugging.
[0054] It is not difficult to understand that in order to achieve accurate control and management of each device connected to the server, the server and the operating system need to clarify the specific setting location of each device on the server motherboard. Therefore, the description file needs to include but is not limited to the location information of the central processing unit in the server, the location information of the root port of the central processing unit, and the corresponding relationship between the slot and the root port of the device. These location information that characterizes the hardware connection of the device. The location information of the central processing unit in the server is considered to be when there are multiple CPUs in the server, it is necessary to clarify which CPU the device is connected to, so it is necessary to define the location information of the CPU corresponding to the device in the description file, which can be specifically the number of the CPU; the location information of the root port of the central processing unit is considered to be when there are multiple root ports under the CPU, it is necessary to clarify which root port the device is mounted under, so it is necessary to define the location information of the root port corresponding to the device in the description file, which can be specifically the port number of the root port; the corresponding relationship between the slot and the root port of the device is considered to be that there may be multiple levels of slots under a root port, and it is also necessary to clarify which slot the device is specifically set in, so it is necessary to define the corresponding relationship between the slot where the device is located and the root port in the description file, specifically, the slot under the root port can be numbered based on the corresponding relationship between the slot and the root port, and the specific slot position can be located by the slot number. You can also pre-number all slots or directly number the devices, and further locate the device by further defining the BDF number of the device or the BDF number of the slot where the device is located in the description file, to ensure accurate control and management of each device connected to the server.
[0055] Furthermore, the operating system will need to determine which of all the devices connected to the server are target devices that need to support pop-up hot plugging based on the description file. Therefore, the description file needs to include a functional identifier of whether the slot supports hot plugging. If the slot supports hot plugging, it means that the device set in the slot is the target device that needs to support pop-up hot plugging. At the same time, the operating system's management of the target device also needs to ensure that the power management method of the target device is the operating system's direct power management method. Therefore, the description file needs to define the power management method of the device set in the slot. Considering that the target device will need to be displayed on the monitor later, and in order to further distinguish each device, the description file can also add the name of the device set in the slot.
[0056] It should be noted that each piece of information in the description file is predefined by the user according to the actual situation of the device. For example, when a PCI device is inserted into slot No. 1 directly connected to the third Root port under the third Root port of CPU0 in the server, the location information of the central processor in the description file corresponding to the PCI device represents CPU0, the location information of the root port of the central processor represents the third Root port, and the corresponding relationship between the slot and the root port of the device represents slot No. 1 directly connected to the third Root port. When a PCI device needs to support the pop-up hot-plug function, the power management mode of the device set on the slot in the corresponding description file is the direct power management mode of the operating system, and the function flag of whether the slot supports hot-plugging represents that the slot supports hot-plugging.
[0057] The present invention adopts BIOS to set the power management mode to an OSPM management mode when the server is started. At the same time, a description file of a DSDT table of ACPI is loaded in a DXE startup phase of the BIOS. In the description file of the DSDT table, location information of a CPU is defined, location information of a root port is defined, location information of a root port where a PCI slot number is located is defined, a BDF number of a slot number of a PCI device is defined, a power management mode of a PCI slot slot device is defined, and a hot-plug function of the PCI slot slot is defined. After the BIOS startup is completed and a Windows system is entered, the hot-plug function of the PCI device under the system can be realized in combination with the OSPM management mode of the system.
[0058] On the one hand, the target device that needs to support pop-up hot plugging among all the devices connected to the slot is determined according to the device connection information, including: Determine the value of the preset register according to the description file; wherein the value of the preset register is a function identifier of whether the slot supports hot plugging in the description file; A target device that needs to support pop-up hot plugging is determined among all devices connected to the slot based on the value assigned to the preset register.
[0059] It is understandable that the process of defining whether the slot in the description file supports hot plugging can be implemented by assigning registers. Preset registers corresponding to each device are pre-set in the CPU. The preset register is set in the CPU to which the device is connected. If the device needs to support the pop-up hot plug function, the corresponding preset register is assigned to 1, indicating that the slot where the device is located supports hot plugging. If the device does not need to support the pop-up hot plug function, the corresponding preset register is assigned to 0, indicating that the slot where the device is located does not support hot plugging. Therefore, the operating system can directly determine whether the slot where the device is located supports hot plugging according to the assignment of the preset register in the description file. The application does not make any special restrictions on the specific assignment values, and is not limited to the method of assigning 1 to the corresponding preset register that needs to support the pop-up hot plug function in this embodiment. The preset register can be specifically the EJ0 register. Each PCI device has a specific and unique EJ0 register in the CPU, that is, the EJO register is assigned to 1 to represent that the PCI device pop-up hot plug function is supported under Windows.
[0060] It should be noted that in the description file of the DSDT table, the process of defining the location information of the CPU, defining the location information of the Root port, defining the location information of the Root port where the PCI slot number is located, defining the BDF number of the Slot number of the PCI device, defining the power management method of the PCI Slot slot device, and defining the hot-swap function of the PCI slot slot are all defined by the user after confirmation based on the actual physically connected PCI device situation.
[0061] The present invention can confirm the information of a unique PCI device by confirming the slot information of the PCI device, the location information of the CPU to which it belongs, the BDF number of the PCI device, the Root port information of the PCI device, etc., and define these information in the description file of the DSDT table, by defining the location information of the CPU, defining the location information of the Root port, defining the location information of the Root port where the PCI slot number is located, defining the BDF number of the Slot number of the PCI device, defining the power management mode of the PCI Slot slot device, and defining the PCI The hot-swap function of the slot; at the same time, the OSPM management mode is set and the OSPM driver of Windows is loaded when the BIOS is started. The two processes cooperate to realize the pop-up hot-swap function management of the PCI device through the OSPM management driver under the operating system. The information defined in the DSDT table needs to be interactively used when OSPM manages the pop-up PCI device under the Windows system. If the DSDT file is not defined as above, the pop-up PCI device hot-swap management function cannot be supported under the Windows system. At the same time, the present invention is only applicable to server systems that support the Windows operating system and support the OSPM management mode. In addition to the traditional NVME hard disk and U disk interface devices under the Windows system, the hot-swap function of peripherals supporting the PCI interface is realized.
[0062] See also Figure 5 As shown, Figure 5 A schematic diagram of a pop-up hot-swap function list provided by an embodiment of the present invention; see Figure 6 As shown, Figure 6 A schematic diagram of another pop-up hot-plug function list provided for an embodiment of the present invention; on the one hand, the display of the server is controlled to display, including: the display of the server is controlled to display the device names of all target devices through a pop-up hot-plug function list.
[0063] It is not difficult to understand that after determining the target device that needs to support pop-up hot plugging among all the devices connected to the slot, the operating system will control the server's display to display it. For the convenience of display, each target device is displayed in a list display. At the same time, in order to facilitate the user to select a target device for a pop-up operation when he wants to perform a hot plug operation on a certain target device, the device name of each target device is displayed in the pop-up hot plug function list. The present application does not make any special restrictions on the specific display format and display content, and is not limited to the contents specified in this embodiment. In addition to the device name of the target device, the location information of the central processor in the server of the target device, the location information of the root port of the central processor, the correspondence between the slot and the root port where the device is set, and other location information can be further displayed in the list to facilitate the user to accurately select the target device he wants to pop up according to the positioning. Figure 5 As shown, Figure 5 What is displayed is a pop-up hot-swap function list when only NVME hard disk hot-swap is supported or all PCI devices that support hot-swap are unplugged. "INSPUR-NS8610G1U160", "U212", and "INSPUR-NS8610G1U160" are the device names of the three NVME hard disks connected to the server.
[0064] It should be noted that the device name is generally a relatively common unified name of the device determined based on the device's manufacturer, batch, model and other production information and functional information. If there are two target devices with exactly the same manufacturer, type, batch, etc. among the devices connected to the server, the original device names of the two target devices may be the same. In this case, when defining the device name in the description file, you can distinguish them by adding a suffix number after the device name. Figure 6 As shown, Figure 6The figure shows a pop-up hot-plug function list that supports hot-plug functions for all PCI devices, where "U212" is the device name of the NVME hard disk connected to the server. "AVAGO MegaRAID SASAdapter", "Intel(R) 82599 10 Gigabit Dual Port Network Connection", "Intel(R)82599 10 Gigabit Dual Port Network Connection #2", "Intel(R) I350 GigabitNetwork Connection #3", "Intel(R) I350 Gigabit Network Connection", "Intel(R)I350 Gigabit Network Connection #2", and "Intel(R) I350 Gigabit Network Connection#4" are the device names of the seven PCI devices connected to the server. The original names of the devices "Intel(R) 82599 10 GigabitDual Port Network Connection" and "Intel(R) 82599 10 Gigabit Dual PortNetwork Connection #2" are the same, and the suffix number #2 is added to distinguish them. The original names of the devices "Intel(R) I350 Gigabit Network Connection #3", "Intel(R) I350 GigabitNetwork Connection", "Intel(R) I350 Gigabit Network Connection #2" and "Intel(R) I350 Gigabit Network Connection #4" are the same, and the suffix numbers #2, #3 and #4 are added to distinguish them.
[0065] Specifically, by directly displaying the device names of all target devices in the pop-up hot-plug function list, users can conveniently check the status of hot-pluggable devices currently connected to the server at any time. At the same time, when hot-plugging operations are required, users can directly select the target device to be popped up in the list to implement hot-plugging, which facilitates user operations and improves user experience.
[0066] On the one hand, the method further includes: when a target device has been hot-plugged, deleting information of the hot-plugged target device in the pop-up hot-plug function list.
[0067] It is understandable that when a target device is hot-plugged, the target device is no longer connected to the server and cannot be ejected again, so the operating system can delete the information of the hot-plugged target device in the pop-up hot-plug function list. As the target device is hot-plugged, the operating system can dynamically refresh the pop-up hot-plug function list in real time and can also update the device name and other information of the PCI device in real time.
[0068] Specifically, the display information in the pop-up hot-plug function list can also be updated in real time with the user's hot-plug operation and the pop-up status of the target device, thereby improving the real-time and accuracy of the pop-up hot-plug function list, avoiding the user's invalid operation on the already popped-up target device, ensuring that the pop-up hot-plug function list contains valid target devices that can be popped up, and facilitating the user to promptly confirm whether the pop-up operation is successful, thereby improving the user's usage experience.
[0069] On the one hand, determining the target device that needs to be hot-plugged includes: when a user selection instruction is received, determining the target device that needs to be hot-plugged based on the user selection instruction.
[0070] It is not difficult to understand that when a user needs to hot-unplug a target device in an actual application, the user needs to send a user selection instruction to the server to indicate the object to be hot-unplugged. The user selection instruction is an instruction that can represent that the user has selected a target device in the pop-up hot-plug function list, including the specific content of which target device the user has selected. After the server's operating system receives the user selection instruction, it can determine the target device that the user wants to hot-unplug according to the user selection instruction, and then pop up the target device that the user wants to hot-unplug. The present application does not make any special restrictions on the specific implementation method and content of the user selection instruction. For example, the user's right-click can be set as a user selection instruction. When the user right-clicks on the device name of a target device displayed in the pop-up hot-plug function list, the target device is determined as the target device that needs to be hot-unplugged. The target devices can be numbered according to the display order from top to bottom in the pop-up hot-plug function list, and the number is set in the user selection instruction to indicate the target device that needs to be hot-unplugged.
[0071] Furthermore, in the present invention, the hot unplugging of the target device is achieved by ejecting, so after the target device is ejected, the hardware connection with the server is still maintained, but after the hot unplugging, the data transmission between the target device and the server will be interrupted. At this time, if the user wants to re-enable the device, the entire server needs to be restarted. After the server is re-initialized, data transmission will be re-established between the target device that maintains the hardware connection with the server. Therefore, when the user has the need to restart the hot-unplugged target device, a restart instruction is sent to the server, and after the server operating system receives the restart instruction, the server is automatically restarted.
[0072] Specifically, it is generally necessary to determine the target device that needs to be hot-unplugged under the user's instructions. The user can instruct the server which target device needs to be hot-unplugged according to actual application requirements, so that the server can accurately pop up the corresponding target device according to the user's usage, ensuring the user's normal use of the device and avoiding the situation where a device that the user still needs to use is accidentally popped up, causing the user to be unable to use the required functions.
[0073] On the one hand, before the target device that needs to be hot-unplugged is ejected, it also includes: Determine whether the target device to be hot-plugged is in use; If not, the control ejects the target device that needs to be hot-plugged.
[0074] It is understandable that when the target device that needs hot unplugging is ejected, the target device may still be occupied by other programs, that is, the target device may still be in the state of being used. If the target device is in use and is occupied by other programs, if the data transmission between the target device and the server is disconnected at this time, it will cause data loss and device failure. In this case, it is best not to perform the operation of ejecting the target device. Therefore, before controlling the target device that needs hot unplugging to be ejected, the operating system also needs to further determine whether the target device that needs hot unplugging is in the state of being used. Only when the target device is not in use, the operating system can control the target device that needs hot unplugging to be ejected. The specific implementation method for determining whether the target device is in use, etc., is not particularly limited in this application.
[0075] Specifically, before controlling the ejection of the target device to be hot-plugged, the operating system can further determine whether the target device to be hot-plugged is in use, thereby avoiding abnormal failures caused by ejection when the target device is in use and ensuring that the target device can be effectively ejected when not in use.
[0076] On the one hand, controlling the ejection of the target device that needs to be hot-plugged includes: calling an EJ0 control method to eject the target device that needs to be hot-plugged.
[0077] It is not difficult to understand that the pop-up hot unplugging of the device can be implemented using the EJ0 control method. When this method is called using the ACPI core layer interface acpi evaluate object, the device is unplugged from the system. Therefore, the operating system can implement the device pop-up by directly calling the _EJ0 control method through the OSPM driver. When OSPM calls the _EJ0 control method, the device must be popped out immediately; and the corresponding _EJ0 control will not return before the pop-up is completed. After calling the _EJ0 control method, the OSPM driver can also directly verify whether the target device no longer exists, thereby determining whether the pop-up is successful.
[0078] Specifically, the process of controlling the ejection of the target device that needs to be hot-plugged can be realized directly by calling the EJ0 control method, which is simple, effective, and easy to implement, and is conducive to the simple implementation of the entire ejection hot-plug control method.
[0079] See also Figure 7 As shown, Figure 7 A schematic diagram of a pop-up window prompting a device that cannot be popped up is provided in an embodiment of the present invention; on the one hand, it also includes: if the target device that needs to be hot-plugged is in use, a prompt operation of prompting that the device cannot be popped up is executed.
[0080] It is understandable that in order to avoid repeated invalid operations by the user, the user can be further prompted that the target device cannot be popped up when the target device is in use, so that the user can promptly determine the usage of the target device, and the occupancy of the target device can be released according to the actual usage, etc., to further facilitate the pop-up of the target device. The specific type and implementation method of the prompt operation are not particularly limited in this application, and the prompt to the user can be implemented through pop-up windows and other methods. Figure 7 As shown, a pop-up window "Problem occurred when popping up AVAGO MegaRAID SAS Adapter" is popped up to prompt the user that the target device "AVAGO MegaRAID SAS Adapter" cannot be popped up. The pop-up window prompts the user that the reason why the target device cannot be popped up is "The device is in use.", and the solution provided is "Please close all programs or windows that may use the device and try again." The pop-up window can also further prompt the user the specific process in which the device is being used, etc. There are also many ways to implement the prompt content, and this application does not make any special restrictions here.
[0081] Specifically, when the target device cannot be ejected during use, a prompt operation is promptly performed to prompt the user that the target device cannot be ejected, so that the user can promptly handle the use of the target device, while avoiding the user's repeated operations without knowing the reason why the target device cannot be ejected, thereby improving the user experience.
[0082] On the one hand, it also includes: If the target device to be hot-plugged is in use, then it is detected whether the target device to be hot-plugged is stopped; If it is detected that the target device that needs to be hot-plugged is no longer in use, the target device that needs to be hot-plugged is controlled to be ejected.
[0083] It is not difficult to understand that, when the user is prompted that the target device is in use and cannot be ejected, the user may manually end the use of the target device or the target device will end use after a period of time. At this time, the pop-up hot unplugging process of the target device can be performed. Therefore, if the target device that needs to be hot-unplugged is in use, it is possible to further detect whether the target device that needs to be hot-unplugged has stopped using. Once it is detected that the target device that needs to be hot-unplugged has stopped using, the target device that needs to be hot-unplugged can be controlled to be ejected. There are many options for the specific implementation method of the subsequent detection of whether the target device that needs to be hot-unplugged has stopped using, such as continuous detection within a preset time period, or periodic detection according to a certain preset period, etc., and this application does not make any special restrictions here.
[0084] Specifically, when the target device is in use, a process can also be set to detect whether the target device that needs to be hot-unplugged has stopped being used, so that the target device can be automatically popped out in time when it stops being used, without the user having to perform repeated operations. To facilitate user operations, the user can also be prompted after the automatic pop-up that the target device has been automatically popped out, thereby improving the user experience.
[0085] In order to solve the above technical problems, an embodiment of the present invention further provides a pop-up hot-swap control device, comprising: A power setting unit, used to set the power management mode of the server to the direct power management mode of the operating system; A device information acquisition unit, used to acquire device connection information of each root port of the loaded central processor; wherein the device connection information includes whether the slot to which the root port is connected supports hot plugging and the power management mode of the device set on the slot; a target device display unit, used to determine the target device that needs to support pop-up hot plugging among all the devices connected to the slot according to the device connection information, and control the display of the server to display; wherein the power management mode of the target device is the direct power management mode of the operating system; The hot-plug unit is used to determine the target device that needs to be hot-plugged and control the ejection of the target device that needs to be hot-plugged.
[0086] On the one hand, the power setting unit includes: a power setting subunit, which is used to set the power management mode of the server to the operating system direct power management mode when the server enters the driver execution environment stage.
[0087] On the one hand, it also includes: a file configuration unit, which is used to configure a description file of a differentiated system description table using an advanced configuration and power interface protocol for all root ports of the central processor.
[0088] The file loading unit is used to load the description file after the power management mode of the server is set.
[0089] The device information acquisition unit includes: a device information acquisition subunit, which is used to acquire device connection information of each root port from the loaded description file.
[0090] On the one hand, the target device display unit includes: a register assignment determination unit, used to determine the assignment of a preset register according to the description file; wherein the assignment of the preset register is a function identifier of whether the slot in the description file supports hot plugging.
[0091] The target device determining unit is used to determine the target device that needs to support pop-up hot plugging among all the devices connected to the slot based on the value assigned to the preset register.
[0092] On the one hand, the target device display unit includes: a list display unit, which is used to control the display of the server to display the device names of all target devices through a pop-up hot plug function list.
[0093] On the one hand, it also includes: a list updating unit, which is used to delete the information of the target device that has been hot-plugged in the pop-up hot-plug function list when there is a target device that has been hot-plugged.
[0094] In one aspect, the hot unplug unit includes: an indication unplug unit, which is used to determine the target device that needs to be hot unplugged based on the user selection instruction when receiving the user selection instruction.
[0095] On the one hand, it also includes: a judgment unit, which is used to judge whether the target device to be hot-plugged is in use; if not, triggering the ejection unit in the hot-plugging unit.
[0096] The ejection unit is used to control the ejection of the target device that needs to be hot-plugged.
[0097] On the one hand, the eject unit includes: a calling unit, which is used to call the EJ0 control method to eject the target device that needs to be hot-plugged.
[0098] On the one hand, it also includes: a prompt unit, which is used to execute a prompt operation to prompt that the device cannot be ejected if the target device that needs to be hot-plugged is in use.
[0099] On the one hand, it also includes: a repeated detection unit, if the target device to be hot-plugged is in use, it detects whether the target device to be hot-plugged is stopped; if it is detected that the target device to be hot-plugged is stopped, the ejection unit in the hot-plugging unit is triggered.
[0100] For the description of the features of the pop-up hot-swap control device provided in the embodiment of the present invention, reference may be made to the relevant description of the embodiment of the pop-up hot-swap control method described above, which will not be described in detail here.
[0101] See also Figure 8 As shown, Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. To solve the above technical problems, an embodiment of the present invention further provides an electronic device, comprising: a memory 60 for storing a computer program; a processor 61 for implementing the steps of the control method of the pop-up hot plug as in the above embodiment when executing the computer program.
[0102] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0103] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0104] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, it can implement the relevant steps of the control method of the pop-up hot plug disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include but is not limited to the data in the control method of the pop-up hot plug, etc.
[0105] In some embodiments, the electronic device may further include a display screen 62 , an input / output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .
[0106] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure.
[0107] For the description of the features of the electronic device provided by the embodiment of the present invention, reference may be made to the relevant description of the embodiment of the pop-up hot-swap control method described above, which will not be described in detail here.
[0108] It is understandable that if the control method of the pop-up hot plug in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program codes.
[0109] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method for pop-up hot plugging are implemented.
[0110] For the description of the features in the computer-readable storage medium provided in the embodiment of the present invention, reference may be made to the relevant description of the embodiment of the pop-up hot-swap control method described above, which will not be described in detail here.
[0111] To solve the above technical problem, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned pop-up hot-swap control method when executed by a processor.
[0112] For descriptions of features in the computer program product provided by the embodiments of the present invention, reference may be made to the relevant descriptions of the embodiments of the pop-up hot-plug control method described above, which will not be described in detail here.
[0113] The above is a detailed introduction to a control method, device, medium and program product for pop-up hot plug provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various 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 description.
[0114] 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.
[0115] The above is a detailed introduction to a pop-up hot-swap control method, device, medium and program product provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods 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. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A control method for pop-up hot plug, It is characterized in that include: Set the server's power management mode to the operating system direct power management mode; Obtaining device connection information of each root port of the loaded central processing unit; wherein the device connection information includes whether the slot to which the root port is connected supports hot plugging and the power management mode of the device set on the slot; Determine, according to the device connection information, a target device that needs to support pop-up hot plugging among all devices connected to the slot, and control the display of the server to display; wherein the power management mode of the target device is the direct power management mode of the operating system; Determine the target device that needs to be hot-plugged, and control the ejection of the target device that needs to be hot-plugged.
2. The control method of pop-up hot-swap as claimed in claim 1, It is characterized in that Set the server's power management mode to the operating system direct power management mode, including: When the server enters the driver execution environment stage, the power management mode of the server is set to the operating system direct power management mode.
3. The control method of pop-up hot-swap as claimed in claim 1, It is characterized in that Before obtaining the device connection information of each root port of the loaded CPU, it also includes: A description file for configuring a differentiated system description table using the Advanced Configuration and Power Interface protocol for all root ports of the central processor; After the power management mode of the server is set, loading the description file; Get the device connection information of each root port of the loaded CPU, including: Get the device connection information of each root port from the loaded description file.
4. The control method of pop-up hot plug as claimed in claim 3, It is characterized in that The description file includes: the location information of the central processor in the server, the location information of the root port of the central processor, the correspondence between the slot where the device is set and the root port, the power management mode of the device set in the slot, the name of the device set in the slot, and the function identifier of whether the slot supports hot plugging.
5. The control method of pop-up hot-swap as claimed in claim 4, It is characterized in that According to the device connection information, a target device that needs to support pop-up hot plugging is determined among all devices connected to the slot, including: Determine the value of the preset register according to the description file; wherein the value of the preset register is a function identifier of whether the slot in the description file supports hot plugging; A target device that needs to support pop-up hot plugging among all devices connected to the slot is determined based on the value assigned to the preset register.
6. The control method of pop-up hot plug as claimed in claim 4, It is characterized in that Control the server's monitor to display: The control server's monitor displays the device names of all target devices via a pop-up hot-plug function list.
7. The control method of pop-up hot plug as claimed in claim 6, It is characterized in that Also includes: When there is a target device that has been hot-plugged, the information of the target device that has been hot-plugged in the pop-up hot-plug function list is deleted.
8. The control method of pop-up hot-swap according to claim 1, It is characterized in that Identify the target devices that need to be hot-plugged, including: When a user selection instruction is received, a target device that needs to be hot-plugged is determined based on the user selection instruction.
9. The control method of pop-up hot-swap according to any one of claims 1 to 8, It is characterized in that Controls the need for hot-plugging of target devices before ejection, and also includes: Determine whether the target device to be hot-plugged is in use; If not, the control ejects the target device that needs to be hot-plugged.
10. The control method of pop-up hot-swap according to claim 9, It is characterized in that Controls ejection of target devices that require hot unplugging, including: Call the EJ0 control method to eject the target device that needs to be hot-plugged.
11. The control method of pop-up hot-swap according to claim 9, It is characterized in that Also includes: If the target device to be hot-plugged is in use, a prompt operation will be executed to indicate that the device cannot be ejected.
12. The control method of pop-up hot-swap according to claim 9, It is characterized in that Also includes: If the target device to be hot-plugged is in use, then it is detected whether the target device to be hot-plugged is stopped; If it is detected that the target device that needs to be hot-plugged is no longer in use, the target device that needs to be hot-plugged is controlled to be ejected.
13. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the pop-up hot-swap control method according to any one of claims 1 to 12.
14. A computer-readable storage medium, It is 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 control method of the pop-up hot plug are implemented as claimed in any one of claims 1 to 12.
15. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the steps of the control method of pop-up hot plugging according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Emergency power supply capable of switching backup batteries by hot plug
CN105553092A
Thermal removal method and system for PCIE equipment and related device
CN109669905A
Hot plug processing method, device, equipment and system and readable storage medium
CN110502464A
Bus equipment hot plug control method and device and readable storage medium
CN117971752A
Cited By
Method for executing hot removal operation, hot plug system, equipment, medium and product
CN119336682A
Method for performing heat removal operation, hot pluggable system, device, medium and product
CN119336682B
Device management method, system, computer program product, electronic device, and medium
CN119396748A
Hot plug control system and method, electronic equipment and storage medium
CN120508521A
Hot-swap control system and method, electronic device, and storage medium
CN120508521B
