Device, server and method for implementing hot removal of expansion equipment

By utilizing the physical connection of the SCI interrupt signal line and the power management configuration protocol in the server, the thermal removal of PCIe extension devices under the operating system is achieved, solving the problem of low device management efficiency in the prior art, and improving the reliability and stability of the server.

CN119226207BActive Publication Date: 2025-04-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411724742.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-25
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Existing server technology is difficult to achieve thermal removal of extended devices under the operating system, resulting in low device management efficiency.

Method used

By introducing a basic input and output system (BIOS) and a general input and output chip into the server, the physical connection of the SCI interrupt signal lines is used to achieve thermal removal of PCIe expansion devices. The specific steps include adding interrupt control options to the setup interface of the BIOS, detecting and setting interrupt control options for the target expansion slot, enabling SCI interrupts, and parsing the power management configuration protocol in the operating system to trigger the hot removal operation.

Benefits of technology

The thermal removal of PCIe extended devices under the operating system is achieved, the range of thermally removable devices is expanded, and the reliability and stability of the server is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226207B_ABST
    Figure CN119226207B_ABST
Patent Text Reader

Abstract

The present application provides an implementation device, server and implementation method for hot removal of expansion devices, the method comprising: in response to the server startup, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot; in response to detecting that the setting value of the interrupt control option is enabled, the state value of the target pin of the general input and output chip matching the target expansion slot is set to a first preset value to trigger a system interrupt; in response to detecting that the server enters the operating system, the operating system parses the target interrupt status register corresponding to the target expansion slot in the power management configuration protocol; the target interrupt status register is the first preset value, triggering a hot removal operation for the connected target expansion device. Based on the physical connection between the GPIO chip and the interrupt signal line of the expansion slot, hot removal of the expansion device is realized under the operating system, the range of hot-removable devices is expanded, and the reliability and stability of the server are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to an implementation device, server and implementation method for hot removal of an expansion device. Background Art

[0002] In the server field, servers are adapted to different application scenarios through different configuration models. Regardless of the configuration, the server needs to be assembled at the factory to meet the needs of end customers. In actual use, it is necessary to replace the failed device and control the memory controller to shut down the redundant and unused memory when the memory consumes too much energy. Therefore, in order to improve the applicability and competitiveness of the server, the server is required to have a hot removal function.

[0003] The existing hot removal function requires a conventional method of reserving memory resources in advance, and cannot implement hot removal of expansion devices in the operating system, resulting in low energy efficiency of expansion device management. Therefore, there is an urgent need for a device and method for implementing hot removal of expansion devices in an operating system to solve the above technical problems. Summary of the invention

[0004] Based on this, it is necessary to provide a device, server and method for implementing hot removal of expansion equipment in response to the above technical problems.

[0005] In a first aspect, the present application provides a device for implementing hot removal of an expansion device, the device comprising a first processor, a basic input and output system, and a first general purpose input and output chip;

[0006] The first processor is connected to one or more first expansion slots via a first expansion bus, and the first expansion slots are used to access expansion devices;

[0007] A first interrupt signal line is provided in the first extension slot, and the first extension slot is connected to a designated pin of the first general purpose input and output chip through the first interrupt signal line;

[0008] The basic input-output system is connected to the first processor through a system bus, and the first processor is connected to the first general purpose input-output chip through a first integrated circuit bus;

[0009] The basic input-output system sets the pin state of the first general-purpose input-output chip based on the first processor and the first integrated circuit bus to control an interrupt signal of a first expansion slot on the first processor.

[0010] In some embodiments, the apparatus further comprises one or more second processors and a second general purpose input and output chip;

[0011] The second processor is connected to the first processor via a high-speed interconnect bus;

[0012] The second processor is connected to one or more second expansion slots via a second expansion bus, and a second interrupt signal line is provided in the second expansion slot;

[0013] The second expansion slot is connected to a designated pin of the second general purpose input / output chip via the second interrupt signal line;

[0014] The second general purpose input and output chip is connected to the first processor via a second integrated circuit bus;

[0015] The basic input-output system sets the pin state of the second general-purpose input-output chip based on the first processor and the second integrated circuit bus to control the interrupt signal of the second expansion slot on the second processor.

[0016] In some embodiments, when the number of expansion slots matched by one expansion bus is one, the bandwidth of the interrupt signal line on the expansion slot is set to an X1 specification;

[0017] When there are multiple expansion slots matched with one expansion bus, the bandwidth of the interrupt signal line on the expansion slot matches the bandwidth of the expansion slot with the smallest bandwidth among the multiple expansion slots;

[0018] The expansion bus includes a first expansion bus and a second expansion bus, and the expansion slot includes a first expansion slot and a second expansion slot.

[0019] In some embodiments, the basic input-output system is also connected to a general purpose input-output chip via a third integrated circuit bus;

[0020] The basic input-output system also sets the pin state of the first general-purpose input-output chip based on the third integrated circuit bus to control the interrupt signal of the first expansion slot on the first processor.

[0021] In some embodiments, the basic input-output system is also connected to a general purpose input-output chip via a fourth integrated circuit bus;

[0022] The basic input-output system also sets the pin state of the first general-purpose input-output chip based on the fourth integrated circuit bus to control an interrupt signal of a second expansion slot on the second processor.

[0023] In a second aspect, the present application provides a server, wherein the server comprises the implementation device disclosed in the first aspect;

[0024] The operating system in the server is an operating system that supports power management function.

[0025] In a third aspect, the present application provides a method for implementing hot removal of an expansion device, which is applied to the server disclosed in the fourth aspect, and the method includes:

[0026] In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase;

[0027] In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt;

[0028] In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot;

[0029] In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0030] In some embodiments, the basic input / output system sets the state value of the target pin of the general input / output chip matching the target expansion slot to a first preset value to trigger a system interrupt, including:

[0031] The basic input and output system obtains the slave address of the general input and output chip;

[0032] The basic input-output system sends a setting command to the general input-output chip according to the slave address to set the state value of the target pin to a first preset value and to set the target pin to an output state.

[0033] In some embodiments, in the step of the basic input / output system setting the state value of the target pin of the universal input / output chip matching the target expansion slot to a first preset value to trigger a system interrupt, the method for determining the target pin includes:

[0034] Get the physical connection relationship between the expansion slot and the specified pins of the general input and output chip;

[0035] A target pin matching the target expansion slot is searched according to the physical connection relationship.

[0036] In some embodiments, the operating system triggers a hot removal operation on a target expansion device connected to a target expansion slot matching the target interrupt status register, including:

[0037] Parsing a differential system description table predefined in the power management configuration protocol to obtain a device power management method matching the target extended device;

[0038] The device power management method is executed by a power management function to remove the target expansion device from the server.

[0039] In some embodiments, after the basic input / output system detects the setting of the interrupt control option corresponding to each expansion slot in the initialization phase, the method further includes:

[0040] In response to detecting that the setting value of the interrupt control option corresponding to the designated expansion slot is off, the basic input / output system sets the state value of the general input / output chip pin matching the designated expansion slot to a second preset value;

[0041] In response to detecting that the server enters the operating system, the operating system parses a designated interrupt status register in a power management configuration protocol that corresponds to the designated expansion slot;

[0042] In response to parsing that the designated interrupt status register is a second preset value, the operating system normally runs the designated expansion device connected to the designated expansion slot.

[0043] In some embodiments, before the basic input and output system detects the setting value of the interrupt control option corresponding to each pre-created expansion slot in the initialization phase, the method includes:

[0044] Defining an interrupt control option in a source code of a basic input / output system and storing the interrupt control option, wherein a setting value of the interrupt control option includes enabling and disabling;

[0045] The basic input and output system installation interface code is modified to add the interrupt control option to the basic input and output system installation interface menu.

[0046] In some embodiments, after executing the device power management method through the power management function to remove the target expansion device from the server, the method further includes:

[0047] Verify, by means of the power management function, whether the target expansion device successfully removes the server;

[0048] If it is verified that the target expansion device has not been removed, an alarm is generated to prompt the user that the hot removal operation is abnormal.

[0049] In a fourth aspect, the present application provides a computer program product, which implements the steps of the following method when the computer program is executed by a processor:

[0050] In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase;

[0051] In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt;

[0052] In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot;

[0053] In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0054] In a fifth aspect, the present application provides an electronic device, the electronic device comprising: one or more processors;

[0055] and a memory associated with one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, perform the following operations:

[0056] In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase;

[0057] In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt;

[0058] In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot;

[0059] In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0060] In a sixth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program enables a computer to perform the following operations:

[0061] In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase;

[0062] In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt;

[0063] In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot;

[0064] In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0065] The beneficial effects achieved by this application are:

[0066] The present application provides a method for implementing hot removal of an expansion device, including: in response to the server startup, a basic input / output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase; in response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input / output system sets the state value of the target pin of the general input / output chip matching the target expansion slot to a first preset value to trigger a system interrupt; in response to detecting that the server enters an operating system, the operating system parses the target interrupt status register in the power management configuration protocol that has a corresponding relationship with the target expansion slot; in response to parsing that the target interrupt status register is the first preset value, the operating system triggers the target expansion device connected to the target expansion slot to perform a hot removal operation. On the basis of realizing the physical connection between the GPIO chip and the interrupt signal line of the expansion slot on the expansion link, a BIOS option is added to the setup interface of the BIOS and the option setting value of the BIOS is read when the BIOS is started to confirm which PCI devices of all PCI links need to be hot removed, so as to realize hot removal of PCIe expansion devices under the operating system, expand the range of hot-removable devices, and greatly improve the reliability and stability of the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0068] Figure 1 It is a schematic diagram of an implementation device provided in an embodiment of the present application;

[0069] Figure 2 It is another schematic diagram of an implementation device provided in an embodiment of the present application;

[0070] Figure 3 This is a circuit connection diagram provided by an embodiment of the present application;

[0071] Figure 4 This is a schematic diagram of a device for implementing a multi-core CPU provided in an embodiment of the present application;

[0072] Figure 5 This is a schematic diagram of another implementation device of a multi-core CPU provided in an embodiment of the present application;

[0073] Figure 6 It is a schematic diagram of a method for implementing hot removal of an expansion device provided in an embodiment of the present application;

[0074] Figure 7 It is a flow chart of a method for implementing hot removal of an expansion device provided in an embodiment of the present application;

[0075] Figure 8 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0077] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".

[0078] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0079] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0080] As mentioned in the background technology, the core components of a server are CPU, memory, NVME hard disk and other devices. In addition, PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) interface devices are also needed, such as PCIe network cards, PCIe RAID (Redundant Array of Independent Disks, redundant array of independent hard disks) cards, PCIe GPU cards, PCIe interface acceleration cards, etc. These components are combined in the server configuration to form different configuration models, and the applicable scenarios are also different. Servers for network services require more network card devices, such as PCIe network cards or OCP (Open Compute Project Network Card); for servers for storage data, a large number of NVME (Non Volatile Memory Express) hard drives or RAID cards will be used to transfer more hard drive devices for storage; for computing servers or artificial intelligence servers, more GPUs are needed to assemble GPU servers to meet the computing power requirements. When some servers have high requirements for computing performance or high requirements for read and write speed and timeliness, the memory quantity and capacity requirements are also large, which is usually solved by increasing the capacity of a single memory stick or increasing the number of memories.

[0081] Regardless of the configuration, the server needs to be assembled at the factory and shipped to each customer's computer room or data center to meet the end customer's use. The end customer will operate each device during use. For example, if the server's storage medium NVME hard disk encounters a fault during use, we use the hot removal function of the NVME hard disk to unplug the faulty hard disk, further ensuring that the server does not need to be powered off and disassembled for replacement; for example, if the server has a large amount of memory configuration and in actual business applications, due to excessive memory energy consumption or less use, the redundant and unused memory can be turned off by controlling the memory controller to reduce the overall power consumption of the server or extend the server's memory life; for example, when we use the network card, especially the OCP network card, we also need to perform hot removal according to the actual situation during actual use.

[0082] However, in actual use, in addition to the above-mentioned devices, we also need to support and implement similar hot removal functions for the use of other PCIe devices, such as hot removal functions of GPU cards, hot removal functions of PCIe network cards, and so on. In addition to the hot removal of traditional OCP network cards and NVME hard disks that support the system, we also need to support the hot removal functions of other PCIe devices, such as PCIe network cards, PCIe RAID cards, PCIe GPU cards, etc., and traditional hot removal functions require conventional means such as reserving memory resources in advance. Therefore, traditional hot removal methods are not suitable for PCIe network card devices and cannot implement hot removal functions under the operating system. At this time, the present application proposes a method of realizing hot removal of various PCIe devices such as PCIe network cards, PCIe RAID cards, PCIe GPU cards, etc. through SCI (System Control Interrupt, a system control interrupt) interrupt method.

[0083] Embodiment 1

[0084] The embodiment of the present application provides a device for implementing hot removal of an expansion device, specifically, Figure 1 As shown in the schematic diagram of the device, the implementation device includes a first processor (shown as CPU0 in the figure), a basic input and output system (BIOS, Basic Input Output System) and a first general-purpose input and output chip (shown as GPIO0, General-purpose input / output in the figure).

[0085] The first processor is connected to one or more first expansion slots through a first expansion bus (PCIe bus), wherein it can be understood that the number of first expansion buses connected to the first processor is at least 1; the first expansion slot is used to access an expansion device; a first interrupt signal line is provided in the first expansion slot, and the first expansion slot is connected to a designated pin of a first general purpose input and output chip through the first interrupt signal line, wherein the first interrupt signal line is used to transmit an SCI signal; the basic input and output system is connected to the first processor through a system bus, wherein the system bus includes but is not limited to an LPC bus (LowPin Count, a bus standard for low pin count books), an SPI bus (Serial Peripheral Interface, a synchronous serial communication interface) and a QSPI bus (Quad Serial Peripheral Interface, an extension of SPI), and the first processor is connected to the first general purpose input and output chip through a first integrated circuit bus (I2C, Inter-Integrated Circuit). The basic input and output system sets the pin state of the first general purpose input and output chip based on the first processor and the first integrated circuit bus to control the interrupt signal of the first expansion slot on the first processor.

[0086] In the implementation device with the above connection relationship disclosed in this embodiment, BIOS can control GPIO through CPU, that is, report the slave address of GPIO through the first integrated circuit bus, after BIOS reads the slave address of GPIO, send configuration commands, CPU executes these configuration commands, and sends information corresponding to the configuration commands to GPIO controller through the first integrated circuit bus to set the pin state of GPIO. This provides a physical basis for subsequent support of hot removal of PCIe devices based on SCI interrupts.

[0087] Among them, in a specific implementation scenario, the present application also discloses a new implementation device, such as Figure 2As shown in the schematic diagram, the basic input-output system is also connected to the general input-output chip through the third integrated circuit bus; the basic input-output system also sets the pin state of the first general input-output chip based on the third integrated circuit bus to control the interrupt signal of the first expansion slot on the first processor. That is, the basic input-output system can be directly connected to the general input-output chip through the third integrated circuit bus, and the BIOS can communicate with the GPIO chip through the I2C bus, thereby realizing the reading and setting of the state of the GPIO pin. Specifically, the BIOS sends a setting command to the controller in the GPIO chip through the I2C bus to specify the pin and state to be set; the GPIO controller responds to the setting command and sets the state of the specified pin. It provides a physical basis for realizing another method of BIOS controlling the GPIO pin, enriches the implementation method of BIOS controlling the GPIO chip, and improves the stability of the entire implementation device.

[0088] In a specific implementation scenario, the first expansion bus is split to connect to multiple first expansion slots, or it can be connected to only one first expansion slot without being split. Therefore, when a first expansion bus matches one first expansion slot, the bandwidth of the interrupt signal line on the first expansion slot is set to the X1 specification; it is understandable that since the maximum bandwidth supported by the PCIe link by default is x16, it is also backward compatible with x8, x4, x2 and x1 PCIe devices, so the minimum bandwidth needs to be used when configuring the bandwidth of the interrupt signal line in the expansion slot. When a first expansion bus matches multiple first expansion slots, such as Figure 3 As shown in the figure, each PCIe link contains multiple lanes (channels). Lane is the smallest communication unit in the PCIe link, and each Lane can transmit data independently. Common Lane configurations include x1, x2, x4, x8, x16, etc., which represent 1 Lane, 2 Lane, 4 Lane, 8 Lane and 16 Lane respectively; a x16 PCIe slot can be designed to support multiple configurations such as x8 + x8 or x4 + x4 + x4 + x4. The bandwidth of the interrupt signal line on the first expansion slot matches the bandwidth of the smallest bandwidth expansion slot among the multiple first expansion slots; through the above bandwidth setting, it is guaranteed that the interrupt signal can be transmitted in any first expansion slot and the first general input and output chip.

[0089] Through the above-mentioned physical connection, the BIOS end in the device for implementing the hot removal of the above-mentioned expansion device can read and set the pin status of the GPIO chip through the I2C bus, indirectly control the SCI signal of the expansion link on the CPU side, provide physical support for triggering the conditions for enabling the SCI interrupt, and further realize the hot removal of the expansion device.

[0090] Embodiment 2

[0091] The present application embodiment discloses a device for implementing hot removal of an expansion device suitable for a multi-core processor, such as Figure 4 As shown in the device schematic diagram, based on the implementation device disclosed in Example 1, the implementation device disclosed in this embodiment further includes one or more second processors (shown as CPU1 in the figure) and a second general purpose input and output chip (shown as GPIO1 in the figure).

[0092] The second processor is connected to the first processor through a high-speed interconnect bus, wherein the high-speed interconnect bus includes but is not limited to a CCIX bus (Cache Coherent Interconnect for Accelerators), a UPI bus (Ultra Path Interconnect) and a GMI bus (Gen-Z Memory Interface); the second processor is connected to one or more second expansion slots through a second expansion bus, and a second interrupt signal line is provided in the second expansion slot; the second expansion slot is connected to a designated pin of a second general input / output chip through the second interrupt signal line; the second general input / output chip is connected to the first processor through a second integrated circuit bus; the basic input / output system sets the pin state of the second general input / output chip based on the first processor and the second integrated circuit bus to control the interrupt signal of the second expansion slot on the second processor, and the specific implementation logic is consistent with the content described in the first embodiment, and the present application will not repeat it here.

[0093] Among them, in some implementation scenarios, such as Figure 5 As shown, the basic input-output system is also connected to the general input-output chip through a fourth integrated circuit bus; the basic input-output system also sets the pin state of the first general input-output chip based on the fourth integrated circuit bus to control the interrupt signal of the second expansion slot on the second processor.

[0094] It can be understood that in a specific implementation scenario, similar to the content disclosed in Example 1, when a second expansion bus matches one second expansion slot, the bandwidth of the interrupt signal line on the second expansion slot is set to the X1 specification; and when a second expansion bus matches multiple second expansion slots, the bandwidth of the interrupt signal line on the second expansion slot matches the bandwidth of the expansion slot with the smallest bandwidth among the multiple second expansion slots; through the above bandwidth setting, it is guaranteed that the interrupt signal can be transmitted between any second expansion slot and the second general input and output chip.

[0095] It is worth noting that the first expansion bus and the second expansion bus are both PCIe expansion links, and the first expansion slot and the second expansion slot are both PCIe expansion slots. "First" and "second" are only used to distinguish in the description and have no substantial limitation.

[0096] Embodiment 3

[0097] Corresponding to the above-mentioned embodiment 1 and embodiment 2, an embodiment of the present application provides a server, which includes an implementation device for hot removal of expansion devices disclosed in the above-mentioned embodiment 1 and embodiment 2. The specific content is consistent with the content disclosed in embodiment 1 and embodiment 2, and this embodiment will not be repeated here.

[0098] In addition, the operating system included in the server disclosed in this embodiment must support the power management function (OSPM, OSPower Management). OSPM refers to a series of technologies and mechanisms in the operating system that are responsible for managing and optimizing the use of system power. It achieves the goals of energy saving and extending battery life by managing and optimizing the use of power in the system. It covers multiple aspects such as power state management, device power management, power policy, event processing, etc., and interacts with hardware through interfaces such as ACPI to ensure efficient operation of the system.

[0099] In a specific implementation scenario, a method for implementing hot removal of an expansion device in this server is briefly described, such as Figure 6 As shown, after the server is powered on, the BIOS reads the setting value of the interrupt control option of each PCIe expansion slot in the initialization phase of startup, and determines whether the setting value of the interrupt control option of each PCIe expansion slot is enabled. If the system interrupt corresponding to the PCIe slot is enabled, the corresponding GPIO pin is set to a high level. If not, the system interrupt corresponding to the PCIe slot is disabled, that is, the corresponding GPIO pin is set to a low level; then the BIOS reads the GPIO status value through the slave address of the GPIO chip, and the BIOS sets the status value of the GPIO pin, enabling it to be set to 1, that is, a high level, and disabling it to be 0, that is, a low level, and then the BIOS sets the GPIO pin to the output state; the BIOS enables the setting of the status value of the GPIO pin, and at this time, the value of the GPIO output corresponds one-to-one to the value set by the SCI interrupt option. The server continues to start and enters the operating system. The operating system determines whether the interrupt status register corresponding to each expansion slot is set through the Differentiated System Description Table (DSDT) in the Advanced Configuration and Power Management Interface (ACPI). If it is set to 1, the power management function performs a hot removal operation on the expansion device, such as executing EJ0 for the device. If it is not set to 1, the slot continues to be used normally, and finally the operating system continues to use the PCIe device that has not been hot removed normally.

[0100] Embodiment 4

[0101] Corresponding to all the above embodiments, the present application embodiment also provides a method for implementing hot removal of an expansion device, which is applied to the server disclosed in the third embodiment, such as Figure 7 As shown, the method disclosed in the present application is used to implement hot removal of the expansion device under the operating system, which specifically includes the following contents:

[0102] S1. In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization stage.

[0103] It is understandable that the above interrupt control option is an option pre-added in the installation interface of the basic input and output system. Specifically, the interrupt control option is defined and stored in the source code of the basic input and output system, which is usually stored in the non-volatile random access memory. The setting value of the interrupt control option includes enabling and disabling; modifying the basic input and output system installation interface code to add the interrupt control option to the basic input and output system installation interface menu, specifically find the code responsible for displaying the Setup interface, usually in Setup.c or similar files, and then add new options to the Setup menu in the file. The specific modification of the code is a mature technology in the field, and this application will not be expanded here. It is understandable that this application sets an interrupt control option for each expansion slot to realize the hot removal function of the expansion device connected to the expansion slot.

[0104] In order to use the newly added interrupt control option normally, it is also necessary to test the option, that is, to enter the BIOS Setup interface by starting the server and verify whether the interrupt control option is displayed correctly and functions normally. This application adds an interrupt control option to the BIOS installation interface, and users can directly choose to enable or disable it according to the interrupt control option, further realizing the hot removal of connected expansion devices, greatly improving the user experience.

[0105] It is understandable that in order to reduce the possibility of abnormal settings, the present application also proposes to detect whether an expansion device is connected to the expansion slot on each expansion link; in response to detecting that there is an expansion slot that is not connected to an expansion device, an abnormal prompt is generated for the expansion slot in the installation interface to prompt the user that there is no need to set the interrupt control option for the expansion slot. In addition, in addition to manually selecting to enable and disable the interrupt control option provided by the present application, an intelligent setting method is also proposed: detecting whether the expansion device on each expansion slot reports abnormal information or whether the expansion device is running with tight resources, and automatically setting the corresponding interrupt control option value to enable after detecting that the expansion device on each expansion slot reports abnormal information or whether the expansion device is running with tight resources.

[0106] S2. In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input / output system sets the state value of the target pin of the general input / output chip matching the target expansion slot to a first preset value to trigger a system interrupt.

[0107] When the basic input and output system detects that the setting value of the interrupt control mandatory option is enabled, the corresponding expansion operation is defined as the target expansion slot that needs to be hot-removed, and then locates the target pin in the universal input and output chip according to the target expansion slot, and sets the state value of the target pin. Among them, the method for determining the target pin includes obtaining the physical connection relationship between the expansion slot and the designated pin of the universal input and output chip; searching for the target pin that matches the target expansion slot according to the physical connection relationship. Through the physical connection relationship, it is directly located on the target pin that matches the target expansion slot, which is convenient, fast and accurate, and improves the overall hot removal speed. It can be understood that when the device disclosed in the above-mentioned embodiment one or two is installed, the corresponding topological structure will be detected and retained for the implementation device to show the physical connection relationship of each component. The detection method of the topological structure is a mature technology in the field, and this application will not be repeated here; of course, when connecting the interrupt signal line of the expansion slot and the basic input and output chip pin, the physical connection can be performed according to the preset connection rule, that is, the connection rule represents the physical connection relationship between the expansion slot and the pin, and the connection rule is input and saved in the server for reading.

[0108] Specifically, the basic input-output system obtains the slave address of the general input-output chip, wherein the slave address is obtained according to the first integrated circuit bus or the second integrated circuit bus connected to the first processor or the second processor, and in some implementation scenarios, it can also be directly obtained according to the third integrated circuit bus and the fourth integrated circuit bus directly connected to the general input-output chip. The basic input-output system sends a setting command to the general input-output chip according to the slave address to set the state value of the target pin to the first preset value and set the target pin to the output state. In this application, the first preset value is 1, that is, the high level is valid; currently in some scenarios, it can also be set to 0, that is, the low level is valid, and this application does not limit this.

[0109] In some implementation scenarios, the setting value of the interrupt control option may be off. In this case, in response to detecting that the setting value of the interrupt control option corresponding to the specified expansion slot is off, the basic input and output system sets the state value of the general input and output chip pin matching the specified expansion slot to a second preset value; in response to detecting that the server enters the operating system, the operating system parses the specified interrupt status register in the power management configuration protocol that corresponds to the specified expansion slot; in response to parsing that the specified interrupt status register is the second preset value, the operating system normally operates the specified expansion device connected to the specified expansion slot. The second preset value is related to the setting of the first preset value. If it is high level valid, the second preset value is set to 0, and if it is low level valid, the second preset value is set to 1.

[0110] S3. In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in the power management configuration protocol that corresponds to the target expansion slot.

[0111] Among them, the power management configuration protocol (ACPI, Advanced Configuration and PowerInterface) is an open standard specification for implementing the operating system's control over power management and system configuration. The above-mentioned differential system description table is one of the ACPI tables, which contains system-specific configuration information and control methods, and is used to describe the system's hardware resources and power management functions. In this application, it is specifically manifested in defining the CPU location information and the port location information of the expansion slot in the description file of the DSDT table.

[0112] After the system interrupt (SCI) is triggered, the interrupt controller will generate an interrupt request. After the operating system obtains the interrupt request, the OSPM of the operating system will actively poll and determine which slot on the expansion bus the target interrupt status register comes from, thereby realizing hot removal of the device under the system.

[0113] S4. In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0114] Specifically, it includes: parsing the differential system description table predefined in the power management configuration protocol to obtain a device power management method that matches the target expansion device; executing the device power management method through the power management function to remove the target expansion device from the server. It can be understood that the above device power management method is pre-compiled in the description file of the DSDT table, and a device power management method is set for each expansion device, which is set as the EJ0 method in the embodiment of the present application.

[0115] The following is a code of an APCI protocol for implementing the extended device hot removal method disclosed in this application. It can be understood that it can also be adaptively modified according to the actual scenario. The following code is only an example and has no binding effect:

[0116] / / Tell OS to run thru the new status of this device (Software SCIgenerated from SMM for all Hot plug events)

[0117] Method (_L62, 0x0, NotSerialized) {

[0118] if(LEqual(SCI0, 3)) { / / Device ejection (Invoked with _EJ0called method)

[0119] / / NTFM(SCI1, 3)

[0120] NTFC(SCI2, 3)

[0121] Store (0, SCI0)

[0122] } ElseIf (LEqual(SCI0, 1)) { / / Device check (OS can still rejectonline request based on resources and capability)

[0123] NTFC (CPHP, 0)

[0124] NTFI (IIOP, 0)

[0125] Store (0, CPHP)

[0126] Store (0, IIOP)

[0127] Store (0, SCI0)

[0128] Name(_HPP, Package(){0x08,0x40, 0x01, 0x00}) / / Device definitions forSlot 1- HOT PLUG SLOT

[0129] Device (S1F0) {

[0130] / / Slot 1, Func#0 on bus P2P2

[0131] Name(_ADR,0x00020000)

[0132] Method(_EJ0, 1) {

[0133] / / Remove all power to device}

[0134] }

[0135] Device (S1F1) {

[0136] / / Slot 1, Func#1 on bus P2P2

[0137] Name(_ADR,0x00020001)

[0138] Method(_EJ0, 1) {

[0139] / / Remove all power to device}

[0140] }

[0141] Device (S1F2) {

[0142] / / Slot 1, Func#2 on bus P2P2

[0143] Name(_ADR,0x000200 02)

[0144] Method(_EJ0, 1) {

[0145] / / Remove all power to device}

[0146] }Device (S1F3) {

[0147] / / Slot 1, Func#3 on bus P2P2

[0148] Name(_ADR,0x00020003)

[0149] Method(_EJ0, 1) {

[0150] / / Remove all power to device}

[0151] }Device (S1F4) {

[0152] / / Slot 1, Func#4 on bus P2P2

[0153] Name(_ADR,0x00020004)

[0154] Method(_EJ0, 1) {

[0155] / / Remove all power to device}

[0156] }Device (S1F5) {

[0157] / / Slot 1, Func#5 on bus P2P2

[0158] Name(_ADR,0x00020005)

[0159] Method(_EJ0, 1) {

[0160] / / Remove all power to device}

[0161] }Device (S1F6) {

[0162] / / Slot 1, Func#6 on bus P2P2

[0163] Name(_ADR,0x00020006)

[0164] Method(_EJ0, 1) {

[0165] / / Remove all power to device}

[0166] }Device (S1F7) {

[0167] / / Slot 1, Func#7 on bus P2P2

[0168] Name(_ADR,0x00020007)

[0169] Method(_EJ0, 1) {

[0170] / / Remove all power to device}

[0171] }

[0172] / / Device definitions for Slot 2- HOT PLUG SLOT

[0173] Device (S2F0) {

[0174] / / Slot 2, Func#0 on bus P2P2

[0175] Name(_ADR,0x00030000)

[0176] Method(_EJ0, 1) {

[0177] / / Remove all power to device}

[0178] }Device (S2F1) {

[0179] / / Slot 2, Func#1 on bus P2P2

[0180] Name(_ADR,0x00030001)

[0181] Method(_EJ0, 1) {

[0182] / / Remove all power to device}

[0183] }Device (S2F2) {

[0184] / / Slot 2, Func#2 on bus P2P2

[0185] Name(_ADR,0x00030002)

[0186] Method(_EJ0, 1) {

[0187] / / Remove all power to device}

[0188] }Device (S2F3) {

[0189] / / Slot 2, Func#3 on bus P2P2

[0190] Name(_ADR,0x00030003)

[0191] Method(_EJ0, 1) {

[0192] / / Remove all power to device}}

[0193] Device (S2F4) {

[0194] / / Slot 2, Func#4 on bus P2P2

[0195] Name(_ADR,0x00030004) )

[0197] Method(_EJ0, 1) {

[0198] / / Remove all power to device}

[0199] }

[0200] Device (S2F5) {

[0201] / / Slot 2, Func#5 on bus P2P2

[0202] Name(_ADR,0x00030005)

[0203] Method(_EJ0, 1) {

[0204] / / Remove all power to device}

[0205] }

[0206] Device (S2F6) {

[0207] / / Slot 2, Func#6 on bus P2P2

[0208] Name(_ADR,0x00030006)

[0209] Method(_EJ0, 1) {

[0210] / / Remove all power to device}

[0211] }

[0212] Device (S2F7) {

[0213] / / Slot 2, Func#7 on bus P2P2

[0214] Name(_ADR,0x00030007)

[0215] Method(_EJ0, 1) {

[0216] / / Remove all power to device}

[0217] }

[0218] }

[0219] After executing the device power management method through the power management function to remove the target expansion device from the server, the present application also discloses verifying whether the target expansion device is successfully removed from the server through the power management function; if it is verified that the target expansion device is not removed, an alarm prompt is generated to prompt the user that the hot removal operation is abnormal. The alarm prompt can be a buzzer or an indicator light, which will not be elaborated in this application.

[0220] Based on the physical connection between the GPIO chip and the interrupt signal line of the expansion slot on the expansion link, this application adds a BIOS option to the BIOS setup interface and reads the BIOS option setting value when the BIOS is started to confirm which PCI devices of all PCI links need to be hot-removed. At the same time, after the server starts and enters the operating system, the interrupt register is read through the OSPM function under the system to actively identify whether the SCI interrupt of the PCI link is generated, and the value of the interrupt status register is set to 1 to trigger the hot removal operation of the corresponding device on the PCIe slot. The hot removal of PCIe expansion devices under the operating system is realized, the range of hot-removable devices is expanded, and the reliability and stability of the server are greatly improved.

[0221] Embodiment 5

[0222] Corresponding to the above-mentioned Embodiment 1 and Embodiment 2, the embodiment of the present application further provides a computer program, which implements the steps of the following method when the computer program is executed by a processor:

[0223] In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase;

[0224] In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt;

[0225] In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot;

[0226] In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0227] In some implementation scenarios, when the computer program is executed by a processor, the steps of the following method are also implemented:

[0228] The basic input and output system obtains the slave address of the general input and output chip;

[0229] The basic input-output system sends a setting command to the general input-output chip according to the slave address to set the state value of the target pin to a first preset value and to set the target pin to an output state.

[0230] In some implementation scenarios, when the computer program is executed by a processor, the steps of the following method are also implemented:

[0231] Get the physical connection relationship between the expansion slot and the specified pins of the general input and output chip;

[0232] A target pin matching the target expansion slot is searched according to the physical connection relationship.

[0233] In some implementation scenarios, when the computer program is executed by a processor, the steps of the following method are also implemented:

[0234] Parsing a differential system description table predefined in the power management configuration protocol to obtain a device power management method matching the target extended device;

[0235] The device power management method is executed by a power management function to remove the target expansion device from the server.

[0236] In some implementation scenarios, when the computer program is executed by a processor, the steps of the following method are also implemented:

[0237] In response to detecting that the setting value of the interrupt control option corresponding to the designated expansion slot is off, the basic input / output system sets the state value of the general input / output chip pin matching the designated expansion slot to a second preset value;

[0238] In response to detecting that the server enters the operating system, the operating system parses a designated interrupt status register in a power management configuration protocol that corresponds to the designated expansion slot;

[0239] In response to parsing that the designated interrupt status register is a second preset value, the operating system normally runs the designated expansion device connected to the designated expansion slot.

[0240] In some implementation scenarios, when the computer program is executed by a processor, the steps of the following method are also implemented:

[0241] Defining an interrupt control option in a source code of a basic input / output system and storing the interrupt control option, wherein a setting value of the interrupt control option includes enabling and disabling;

[0242] The basic input and output system installation interface code is modified to add the interrupt control option to the basic input and output system installation interface menu.

[0243] In some implementation scenarios, when the computer program is executed by a processor, the steps of the following method are also implemented:

[0244] Verify, by means of the power management function, whether the target expansion device successfully removes the server;

[0245] If it is verified that the target expansion device has not been removed, an alarm is generated to prompt the user that the hot removal operation is abnormal.

[0246] Embodiment 6

[0247] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including: one or more processors; and a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the following operations are performed:

[0248] In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase;

[0249] In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt;

[0250] In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot;

[0251] In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0252] in, Figure 8The architecture of the electronic device is shown exemplarily, and may specifically include a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, and a memory 820. The processor 810, the video display adapter 811, the disk drive 812, the input / output interface 813, the network interface 814, and the memory 820 may be communicatively connected via a bus 830.

[0253] Among them, the processor 810 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more circuits, etc., to execute relevant programs to implement the technical solution provided in this application.

[0254] The memory 820 can be implemented in the form of ROM (Read Only Memory, programmable memory), RAM (Random Access Memory, random access memory), static storage device, dynamic storage device, etc. The memory 820 can store an operating system 821 for controlling the execution of the electronic device 800, and a basic input and output system (BIOS) 822 for controlling the low-level operations of the electronic device 800. In addition, a web browser 823, a data storage management system 824, and an icon font processing system 825, etc. can also be stored. The above-mentioned icon font processing system 825 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 820 and is called and executed by the processor 810.

[0255] The input / output interface 813 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0256] The network interface 814 is used to connect to a communication module (not shown) to achieve communication interaction between the device and other devices. The communication module can achieve communication through a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WIFI, Bluetooth, etc.).

[0257] The bus 830 comprises a pathway for transmitting information between the various components of the device (eg, the processor 810 , the video display adapter 811 , the disk drive 812 , the input / output interface 813 , the network interface 814 , and the memory 820 ).

[0258] In addition, the electronic device 800 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.

[0259] It should be noted that, although the above device only shows a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, a memory 820, a bus 830, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.

[0260] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a cloud service end, or a network device, etc.) to execute the methods of various embodiments of the present application or certain parts of the embodiments.

[0261] Embodiment 7

[0262] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer-readable storage medium storing a computer program, which enables a computer to perform the following operations:

[0263] In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase;

[0264] In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt;

[0265] In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot;

[0266] In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

[0267] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0268] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A device for implementing hot removal of an expansion device, characterized in that: The device includes a first processor, a basic input-output system, and a first general-purpose input-output chip; The first processor is connected to one or more first expansion slots via a first expansion bus, and the first expansion slots are used to access expansion devices; A first interrupt signal line is provided in the first extension slot, and the first extension slot is connected to a designated pin of the first general purpose input and output chip through the first interrupt signal line; When the number of first expansion slots matched by one first expansion bus is one, the bandwidth of the first interrupt signal line on the first expansion slot is set to an X1 specification; When there are multiple first extension slots matched by one first extension bus, the bandwidth of the first interrupt signal line on the first extension slot matches the bandwidth of the extension slot with the smallest bandwidth among the multiple first extension slots; The basic input-output system is connected to the first processor through a system bus, and the first processor is connected to the first general purpose input-output chip through a first integrated circuit bus; The basic input-output system sets the pin state of the first general-purpose input-output chip based on the first processor and the first integrated circuit bus to control an interrupt signal of a first expansion slot on the first processor.

2. The device according to claim 1, characterized in that The device also includes one or more second processors and a second general purpose input and output chip; The second processor is connected to the first processor via a high-speed interconnect bus; The second processor is connected to one or more second expansion slots via a second expansion bus, and a second interrupt signal line is provided in the second expansion slot; When the second expansion bus matches one second expansion slot, the bandwidth of the second interrupt signal line on the second expansion slot is set to an X1 specification; When there are multiple second extension slots matched by one second extension bus, the bandwidth of the second interrupt signal line on the second extension slot matches the bandwidth of the extension slot with the smallest bandwidth among the multiple second extension slots; The second expansion slot is connected to a designated pin of the second general purpose input / output chip via the second interrupt signal line; The second general purpose input and output chip is connected to the first processor via a second integrated circuit bus; The basic input-output system sets the pin state of the second general-purpose input-output chip based on the first processor and the second integrated circuit bus to control the interrupt signal of the second expansion slot on the second processor.

3. The device according to claim 1, characterized in that The basic input-output system is also connected to the general input-output chip via a third integrated circuit bus; The basic input-output system also sets the pin state of the first general-purpose input-output chip based on the third integrated circuit bus to control the interrupt signal of the first expansion slot on the first processor.

4. The device according to claim 2, characterized in that The basic input-output system is also connected to the general input-output chip via a fourth integrated circuit bus; The basic input-output system also sets the pin state of the first general-purpose input-output chip based on the fourth integrated circuit bus to control an interrupt signal of a second expansion slot on the second processor.

5. A server, characterized in that: The server comprises the implementation device according to any one of claims 1 to 4; The operating system in the server is an operating system that supports power management function.

6. A method for implementing hot removal of an expansion device, applied to the server according to claim 5, characterized in that: The method comprises: In response to the server starting up, the basic input and output system detects the setting value of the interrupt control option corresponding to each expansion slot in the initialization phase; In response to detecting that the setting value of the interrupt control option corresponding to the target expansion slot is enabled, the basic input and output system sets the state value of the target pin of the general input and output chip matching the target expansion slot to a first preset value to trigger a system interrupt; In response to detecting that the server enters the operating system, the operating system parses a target interrupt status register in a power management configuration protocol that corresponds to the target expansion slot; In response to parsing that the target interrupt status register is a first preset value, the operating system triggers a hot removal operation on the target expansion device connected to the target expansion slot.

7. The method according to claim 6, characterized in that The basic input / output system sets the state value of the target pin of the universal input / output chip matching the target expansion slot to a first preset value to trigger a system interrupt, including: The basic input and output system obtains the slave address of the general input and output chip; The basic input-output system sends a setting command to the general input-output chip according to the slave address to set the state value of the target pin to a first preset value and to set the target pin to an output state.

8. The method according to claim 7, characterized in that In the step of the basic input / output system setting the state value of the target pin of the universal input / output chip matching the target expansion slot to a first preset value to trigger a system interrupt, the method for determining the target pin includes: Get the physical connection relationship between the expansion slot and the specified pins of the general input and output chip; A target pin matching the target expansion slot is searched according to the physical connection relationship.

9. The method according to claim 6, characterized in that The operating system triggers a hot removal operation on a target expansion device connected to a target expansion slot matching the target interrupt status register, including: Parsing a differential system description table predefined in the power management configuration protocol to obtain a device power management method matching the target extended device; The device power management method is executed by a power management function to remove the target expansion device from the server.

10. The method according to claim 6, characterized in that After the basic input and output system detects the setting of the interrupt control option corresponding to each expansion slot in the initialization phase, the method further includes: In response to detecting that the setting value of the interrupt control option corresponding to the designated expansion slot is off, the basic input / output system sets the state value of the general input / output chip pin matching the designated expansion slot to a second preset value; In response to detecting that the server enters the operating system, the operating system parses a designated interrupt status register in a power management configuration protocol that corresponds to the designated expansion slot; In response to parsing that the designated interrupt status register is a second preset value, the operating system normally runs the designated expansion device connected to the designated expansion slot.

11. The method according to claim 6, characterized in that Before the basic input and output system detects the setting value of the interrupt control option corresponding to each pre-created expansion slot in the initialization phase, the method includes: Defining an interrupt control option in a source code of a basic input / output system and storing the interrupt control option, wherein a setting value of the interrupt control option includes enabling and disabling; The basic input and output system installation interface code is modified to add the interrupt control option to the basic input and output system installation interface menu.

12. The method according to claim 9, characterized in that After executing the device power management method through the power management function to remove the target expansion device from the server, the method further includes: Verify, by means of the power management function, whether the target expansion device successfully removes the server; If it is verified that the target expansion device has not been removed, an alarm is generated to prompt the user that the hot removal operation is abnormal.

13. An electronic device, characterized in that: The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method of any one of claims 6-12 is executed.

14. A computer-readable storage medium, characterized in that: It stores a computer program, which enables a computer to execute the method according to any one of claims 6 to 12.

Citation Information

Patent Citations

  • Hot-swap controller and hot-swap control system

    CN114936177A

  • Control procedure selection

    CN1643497A