PCIe interface-based soft shutdown method and system for operating system in case equipment
By modifying the power button mechanism of the chassis device based on the PCIe interface, the automatic and safe shutdown of the operating system was realized, which solved the problems of cumbersome process and sudden power failure in the existing technology, and ensured the stability of the system and data integrity.
Patent Information
- Application Number
- CN202511400700.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2026-02-06
AI Technical Summary
In existing technologies, PCIe interface-based chassis devices have cumbersome operation procedures during shutdown and are prone to operating system abnormalities and data loss due to sudden power outages. In particular, improper collaboration between administrators and maintenance personnel can affect system stability and data integrity.
By modifying the hardware triggering mechanism of the power button and utilizing the collaborative work of the power module, serial port data conversion board, and main control module, the system can automatically shut down and power off the operating system with a single press of the power button. This includes the power management software generating a shutdown command, the serial port data being converted into PCIe register values, and the main control management software performing data saving and shutting down the operating system.
The shutdown process has been simplified, ensuring that the power is automatically cut off after the operating system has fully executed the shutdown process. This avoids the risk of operating system abnormalities and data loss caused by sudden power outages, and improves system reliability and data integrity.
Smart Images

Figure CN121478352A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer system application, in particular, to a method and system for soft shutdown of an operating system in a chassis device based on a PCIe interface. BACKGROUND
[0002] In today's era of rapid development of information technology, in data centers and various enterprise-level computing environments, chassis devices based on PCIe interfaces are widely used to support the operation of complex business systems. The stable operation of the operating system carried by the chassis device and the reasonable shutdown operation are crucial to ensuring the reliability of the system, the integrity of the data, and the service life of the hardware.
[0003] Currently, the Linux system running in the chassis device has two main shutdown methods. One is that the administrator needs to first log in to the operating system and input a specific shutdown instruction in the system environment to trigger the operating system to execute the shutdown process. The other is that the maintenance personnel go to the machine room and directly cut off the power supply of the chassis by pressing the power button to achieve forced shutdown.
[0004] From the standard operation of the traditional shutdown process, the standard practice is that the administrator first logs in to the operating system, shuts down the operating system normally, and then the maintenance personnel goes to the machine room and presses the power button of the chassis to power off the chassis. Although this operation method is cumbersome and requires the cooperation of the administrator and the maintenance personnel, it can ensure that the operating system can be started normally afterwards and the application data will not be lost, thus maximizing the stability and integrity of the system and data.
[0005] However, in actual operation and management scenarios, due to the complexity of the process management and the uncertainty of human operation, improper process management often occurs. The maintenance personnel may directly press the power button of the chassis in the machine room without confirming whether the operating system has been normally shut down. This improper operation may cause the operating system to suddenly power off, which may cause the operating system to malfunction or even cause the application data to be lost. Once the operating system malfunctions or the data is lost, it may not only affect the continuity of the business, cause service interruption, and cause economic losses to the enterprise, but also may require a lot of time and labor costs for system repair and data recovery.
[0006] Through the patent document retrieval, it is found that the patent for invention with publication number CN110569074A discloses a computer shutdown method, system and storage medium, wherein a method is applied to a control board card, and the method comprises the following steps: generating a shutdown message when a shutdown event is monitored; sending the shutdown message to a computer through a first preset interface, so that the computer calls a shutdown program to close each running software and operating system, and closing the power supply of the computer when the closing of each running software and operating system is completed. The application realizes the communication between the self-made control board card and the computer through the conventional interface, and does not involve the PCIe interface to realize the cooperative shutdown of multiple modules, which is defective in interface application and module cooperation.
[0007] In view of the problems in the prior art, the research on the operating system soft shutdown method and system in a chassis device based on a PCIe interface becomes a key task to be solved at present. SUMMARY
[0008] In view of the defects in the prior art, the purpose of the present application is to provide an operating system soft shutdown method and system in a chassis device based on a PCIe interface.
[0009] According to the operating system soft shutdown method in a chassis device based on a PCIe interface provided by the present application, the following steps are included: Step S1, a user presses a power button, and the power button changes from a pressed state to a popped-up state; Step S2, a power module monitors the voltage value of a power supply signal pin, when the voltage of the power supply signal pin changes from a high level (2.4V-5V) to a low level (0V-0.4V) and continuously maintains the low level (0V-0.4V), the power management software in the power module generates a shutdown instruction according to a communication protocol, and sends the shutdown instruction to a serial data conversion board card through a serial port, and the power module starts a power supply output countdown; Step S3, the FPGA software in the serial data conversion board card receives the shutdown instruction of the serial port, converts the shutdown instruction into a PCIe register value, and writes the PCIe register value into the PCIe register of a special address; Step S4, the host management software in the host module acquires the shutdown instruction by reading the PCIe register value of the special address, and the host management software executes data saving and closes the operating system.
[0010] Step S5, when the power supply output countdown of the power module ends, the power module stops the voltage output, the operating system soft shutdown is completed, and the whole chassis device is powered off.
[0011] Preferably, in step S2, the range of the high level is 2.4V-5V, the range of the low level is 0V-0.4V, and the power supply output countdown is 10 seconds.
[0012] Preferably, the serial port data conversion board card is a data conversion module of a serial port and a PCIe interface, used for converting the shutdown instruction into a PCIe register value.
[0013] The application further provides an operating system soft shutdown system in a chassis device based on a PCIe interface. A power button is used for receiving user operation, and the power button is a self-locking button, which is turned on when pressed and turned off when popped up. A power module is connected with the power button, and when the voltage of a power signal pin of the power module changes from high level to low level, a shutdown instruction is generated and sent through a serial port. A serial port conversion module is connected with the power module through the serial port, used for receiving the shutdown instruction and converting the shutdown instruction into a PCIe register value, and writing the PCIe register value into a PCIe register at a special address. A master control module is connected with the serial port conversion module through a PCIe interface, and the master control module acquires the shutdown instruction by reading the PCIe register value at the special address.
[0014] Preferably, the power button is connected with the power signal pin of the power module, and the voltage of the power signal pin of the power module is pulled low when the power button is popped up.
[0015] Preferably, the power module comprises: A power conversion unit is used for converting 220V alternating current into 12V direct current. A single-chip microcomputer software is used for state reporting and control instruction receiving of the power module.
[0016] Preferably, after 220V alternating current is input into the power module, the single-chip microcomputer software of the power module communicates with the serial port conversion module through a serial port.
[0017] Preferably, the transmission mode of the serial port conversion module is transparent transmission.
[0018] Preferably, the serial port conversion module runs FPGA software, used for writing the PCIe register according to a preset address offset.
[0019] Preferably, the master control module provides a Linux system running environment for a master control management software, the master control management software receives external control instructions through a network port, schedules and controls the running of each module in the chassis device, and simultaneously manages and reports the states of each module in the chassis device.
[0020] Compared with the prior art, the application has the following beneficial effects: 1. The application simplifies the shutdown operation process, and the user can automatically complete the safe closing of the operating system and the power-off of the whole machine by triggering the power button only once, which is more convenient than the two-step operation of traditional software shutdown and manual power-off.
[0021] 2、The application triggers the shutdown mechanism of hardware signal and software cooperation, automatically cuts off the power supply after ensuring the complete execution of the operating system shutdown process, compared with the direct forced power-off mode, effectively avoids the risk of operating system abnormality and data loss caused by sudden power-off. BRIEF DESCRIPTION OF DRAWINGS
[0022] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments thereof, read in conjunction with the accompanying drawings: Figure 1 Figure 1 is a flow chart of an operating system soft shutdown method in a chassis device based on a PCIe interface according to an embodiment of the present application. Figure 2 Figure 2 is a structural block diagram of an operating system soft shutdown system in a chassis device based on a PCIe interface according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] The present application will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of changes and improvements can be made. These all belong to the protection scope of the present application.
[0024] The present application provides a kind of operating system soft shutdown method and system in chassis device based on PCIe interface, it is suitable for the computer single board of running Linux operating system, this scheme is by means of the hardware trigger mechanism of power button, so that user only needs to press the power button of chassis device once, it can trigger operating system safe closing process, after system completes shutdown, automatically cut off power module power supply output, realize complete soft shutdown function.The purpose is to simplify the shutdown process of traditional chassis device, simultaneously, through the shutdown mechanism of hardware signal and software cooperation, effectively avoid the problem of operating system data loss caused by sudden power-off.
[0025] Embodiment 1 Figure 1 Figure 1 is a flow chart of an operating system soft shutdown method in a chassis device based on a PCIe interface according to an embodiment of the present application.
[0026] As shown in Figure 1 The present embodiment provides an operating system soft shutdown method in a chassis device based on a PCIe interface, comprising the following steps: Step S1, the user presses the power button, and the power button changes from the pressed state to the popped-up state, so that the power supply signal pin voltage of the power module is pulled low.
[0027] Specifically, when the user presses and releases the power button, the shutdown process officially begins when the power button pops up.
[0028] In step S2, the power module monitors the voltage value of the power supply signal pin. When the voltage of the power supply signal pin changes from high level (2.4V-5V) to low level (0V-0.4V), the power management software in the power module generates a shutdown command according to the communication protocol and sends the shutdown command to the serial data conversion board through the serial port. The power module then starts the power supply output countdown.
[0029] In this embodiment, the power supply output countdown is 10 seconds, and the 12V power supply output countdown is started simultaneously for 10 seconds. After the countdown ends, the 12V power supply is automatically cut off.
[0030] The serial port data conversion board is a data conversion module between the serial port and the PCIe interface, used to convert power-off commands into PCIe register values.
[0031] Step S3: The FPGA software in the serial port data conversion board receives the power-off command from the serial port, converts the power-off command into a PCIe register value, and writes the PCIe register value into the PCIe register at a dedicated address. In step S4, the main control management software in the main control module obtains the shutdown command by reading the PCIe register value of the dedicated address, and then performs data saving and shuts down the operating system.
[0032] Step S5: When the countdown for the power supply output of the power module ends, the power module stops outputting 12V voltage, the operating system completes the soft shutdown, and the entire chassis device is powered off.
[0033] Example 2: The present invention also provides a soft shutdown system for an operating system in a chassis device based on a PCIe interface. The soft shutdown system for an operating system in a chassis device based on a PCIe interface can be implemented by executing the process steps of a soft shutdown method for an operating system in a chassis device based on a PCIe interface. That is, those skilled in the art can understand the soft shutdown method for an operating system in a chassis device based on a PCIe interface as a preferred embodiment of the soft shutdown system for an operating system in a chassis device based on a PCIe interface.
[0034] Figure 2 This is a structural block diagram of an operating system soft shutdown system in a chassis device based on a PCIe interface, according to an embodiment of the present invention.
[0035] like Figure 2 As shown, the operating system soft shutdown system in this PCIe interface-based chassis device includes: The power button is used to receive user input. The power button is a self-locking button; it is turned on when pressed and turned off when released. The power module is connected to the power button. When the voltage of the power supply signal pin of the power module changes from high level to low level, a power-off command is generated and sent through the serial port.
[0036] In this embodiment, pressing and releasing the power button affects the voltage level of the power supply signal pin of the power module.
[0037] Specifically, the power button is connected to the power supply signal pin of the power module, and the voltage of the power supply signal pin of the power module is pulled low when the power button is released.
[0038] Furthermore, the power module includes: The power conversion unit is used to convert 220V AC power to 12V DC power to power other modules in the chassis. The microcontroller software is used for power module status reporting and control command reception.
[0039] The serial port conversion module connects to the power module via a serial port. It is used to receive power-off commands and convert them into PCIe register values, which are then written to a dedicated PCIe register.
[0040] In this embodiment, after 220V AC power is input into the power supply module, the microcontroller software of the power supply module communicates with the serial port conversion module through the serial port.
[0041] The serial port conversion module uses a transparent transmission method. In actual chassis equipment products, the serial port conversion module also handles other data calculation tasks, but these are unrelated to the content of this patent; therefore, only the serial port data transparent transmission function of the serial port conversion module is described.
[0042] Furthermore, the serial port conversion module runs FPGA software to write to the PCIe register according to a preset address offset.
[0043] The main control module is connected to the serial port conversion module via a PCIe interface. The main control module obtains the shutdown command by reading the value of the PCIe register at a dedicated address.
[0044] In this embodiment, the main control module runs the main control management software. The main control management software obtains the shutdown command by reading the PCIe register value of the dedicated address, performs data saving, and shuts down the operating system.
[0045] Specifically, the main control module provides a Linux system operating environment for the main control management software. The main control management software receives external control commands through the network port, schedules and controls the operation of each module in the chassis, and manages and reports the status of each module in the chassis.
[0046] More specifically, the system's communication connections are as follows: the power button is connected to the power module via a power supply cable; the power module is connected to the main control module, the serial port conversion module, and other modules via power supply cables to provide 12V DC power to each module; the power module is also connected to the serial port conversion module via a serial port; and the serial port conversion module is connected to the main control module via a PCIe interface to achieve data communication.
[0047] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0048] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A method for soft shutdown of an operating system in a PCIe interface-based chassis device, characterized in that, Includes the following steps: Step S1: The user presses the power button, and the power button changes from a pressed state to a released state. Step S2: The power module monitors the voltage value of the power supply signal pin. When the voltage of the power supply signal pin changes from high level to low level, the power management software in the power module generates a shutdown command according to the communication protocol and sends the shutdown command to the serial data conversion board through the serial port. The power module starts the power supply output countdown. Step S3: The FPGA software in the serial port data conversion board receives the power-off command of the serial port, converts the power-off command into a PCIe register value, and writes the PCIe register value into a PCIe register with a dedicated address. Step S4: The main control management software in the main control module obtains the shutdown command by reading the PCIe register value of the dedicated address, and the main control management software performs data saving and shuts down the operating system. Step S5: When the countdown for the power supply output of the power module ends, the power module stops outputting voltage, the operating system completes the soft shutdown, and the entire chassis device is powered off.
2. The method for soft shutdown of the operating system in a PCIe interface-based chassis device according to claim 1, characterized in that, In step S2, the high level range is 2.4V-5V, the low level range is 0V-0.4V, and the power supply output countdown is 10 seconds.
3. The method for soft shutdown of the operating system in a PCIe interface-based chassis device according to claim 1, characterized in that, In step S2, the serial port data conversion board is a data conversion module between the serial port and the PCIe interface, used to convert the shutdown command into a PCIe register value.
4. A soft shutdown system for an operating system in a PCIe interface-based chassis device, characterized in that, include: A power button is used to receive user input. The power button is a self-locking button that connects when pressed and disconnects when released. A power module, connected to the power button, generates a shutdown command when the voltage of the power supply signal pin of the power module changes from high level to low level, and sends it through the serial port. A serial port conversion module is connected to the power module via a serial port. It is used to receive the power-off command and convert the power-off command into a PCIe register value, and write it into a PCIe register with a dedicated address. The main control module is connected to the serial port conversion module via a PCIe interface. The main control module obtains the shutdown command by reading the PCIe register value of the dedicated address.
5. The operating system soft shutdown system in a chassis device based on a PCIe interface according to claim 4, characterized in that, The power button is connected to the power supply signal pin of the power module, and the voltage of the power supply signal pin of the power module is pulled low when the power button is released.
6. The operating system soft shutdown system in a chassis device based on a PCIe interface according to claim 4, characterized in that, The power module includes: The power conversion unit is used to convert 220V AC power to 12V DC power. The microcontroller software is used for status reporting and control command reception of the power module.
7. The operating system soft shutdown system in a chassis device based on a PCIe interface according to claim 4, characterized in that, After 220V AC power is input into the power module, the microcontroller software of the power module communicates with the serial port conversion module through the serial port.
8. The operating system soft shutdown system in a chassis device based on a PCIe interface according to claim 7, characterized in that, The serial port conversion module uses transparent transmission.
9. The operating system soft shutdown system in a chassis device based on a PCIe interface according to claim 8, characterized in that, The serial port conversion module runs FPGA software to write to the PCIe register according to a preset address offset.
10. The operating system soft shutdown system in a chassis device based on a PCIe interface according to claim 4, characterized in that, The main control module provides a Linux system operating environment for the main control management software. The main control management software receives external control commands through the network port, schedules and controls the operation of each module in the chassis, and manages and reports the status of each module in the chassis.
Citation Information
Patent Citations
Computer shutdown method and system and storage medium
CN110569074A