Power restoration management method, processing system based on ARM architecture and electronic equipment
By designing processors, dual-port RAM and state detection modules in ARM architecture devices to detect power supply changes and state control signals, the difficulty in realizing the Restore after AC Power Loss function caused by the lack of PCH controller in ARM architecture devices is solved, and the Restore after AC Power Loss function is realized The function of starting the device in time after power off.
Patent Information
- Application Number
- CN202410933313.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-08
AI Technical Summary
The implementation of the Restore after AC Power Loss function in computer devices with traditional x86 architecture depends on the unique hardware structure, while the lack of a PCH controller in ARM architecture devices makes it difficult to implement this function.
Design a processing system based on ARM architecture, including a processor, dual-port RAM and a state detection module. By detecting the power supply change signal and the processor's state control signal, the power-on state is determined and stored in the dual-port RAM. After the power loss is lost Read the preset power loss recovery strategy and power-on status during power-on re-power to determine whether the processor is powered on or started.
The Restore after AC Power Loss function is implemented in ARM architecture devices to ensure that the device can be powered on and started in time after an unexpected power outage, meeting the needs of continuous operation of the device.
Smart Images

Figure CN118915891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chips, and in particular to a power recovery management method, a processing system based on an ARM architecture, and an electronic device. Background Art
[0002] Restore after AC Power Loss is a setting option in the power management function of BIOS (Basic Input / Output System) to set whether the device should automatically power on after AC power is restored. When this setting option is set to power on, the device will be powered on directly when it is restored after power loss; when this setting option is set to last state, the device will directly restore the state of the device before power loss when it is restored after power loss; when this setting option is set to power off, the device will not be powered on when it is restored after power loss. This setting option is particularly useful for servers, workstations and other devices that need to run continuously, which can ensure that such continuously running devices can be powered on and started in time to continue running when they are restored after an unexpected power outage (such as a power failure).
[0003] In traditional x86 architecture computer devices, the hardware structure that the Restore after AC Power Loss function relies on is as follows: Figure 1 As shown in the figure, the AC Loss (i.e. AC power loss) detection module, COMS RAM and ME (Management Engine) are all integrated into the PCH (Platform Controller Hub) controller. The PCH controller is a unique hardware module of x86 architecture computer devices. The PCH controller does not exist in the currently popular ARM (Advanced RISC Machines, a processor based on a reduced instruction set (RISC)) architecture device, so it is necessary to consider how to implement the Restore after AC Power Loss function in the ARM architecture device. Summary of the invention
[0004] The purpose of the present invention is to provide a power recovery management method, a processing system based on ARM architecture and an electronic device to improve the problems existing in the prior art.
[0005] The embodiments of the present invention can be implemented as follows:
[0006] In a first aspect, the present invention provides a processing system based on an ARM architecture, the processing system comprising a processor, a dual-port RAM, a controller and a status detection module;
[0007] The state detection module is electrically connected to the processor and is used to detect a power supply change signal of the processor;
[0008] The controller is electrically connected to the state detection module and the processor, and is used to determine the power-on state of the processor based on the power supply change signal and the state control signal provided by the processor, and store the power-on state in the dual-port RAM;
[0009] The controller is electrically connected to the dual-port RAM, and is also used to read the preset power-off recovery strategy and the power-on state before power-off stored in the dual-port RAM when it is determined that the processing system is powered on after power failure, and determine whether the processor is powered on and started based on the power-off recovery strategy and the power-on state before power failure.
[0010] Optionally, the dual-port RAM includes a strategy register and a status register, and the register values of the two registers respectively represent the power-off recovery strategy and the power-on status;
[0011] The register value in the strategy register is one of a first setting value, a second setting value and a third setting value, wherein the first setting value indicates that the power failure recovery strategy is to turn on the machine when power is restored, and the second setting value indicates that the power failure recovery strategy is not to turn on the machine when power is restored; and the third setting value indicates that the power failure recovery strategy is to maintain the state before power failure when power is restored;
[0012] The register value in the status register is a fourth set value or a fifth set value, the fourth set value indicates that the power-on state is that the processor is in an unpowered state, and the fifth set value indicates that the power-on state is that the processor is in a powered state.
[0013] Optionally, the number of bits of the policy register and the status register are 2 and 1 respectively.
[0014] Optionally, the first setting value is 00, the second setting value is 01, the third setting value is 10; the fourth setting value is 0, and the fifth setting value is 1.
[0015] Optionally, the processing system further includes a power module and a backup battery;
[0016] The power module is electrically connected to the dual-port RAM, the controller, the status detection module and the processor; the power module is used to convert AC power into DC power to power the dual-port RAM, the controller and the status detection module, and to power the processor under the control of the controller;
[0017] The backup battery is electrically connected to the dual-port RAM and is used to supply power to the dual-port RAM when the processing system loses power.
[0018] Optionally, the processor is also electrically connected to the dual-port RAM, and is used to store the power-loss recovery strategy preset by the user in the dual-port RAM.
[0019] In a second aspect, the present invention provides a power recovery management method, which is applied to a processing system based on an ARM architecture, wherein the processing system includes a dual-port RAM, a processor, a controller, and a status detection module; the controller is electrically connected to the status detection module, the processor, and the dual-port RAM, and the status detection module is electrically connected to the processor; the method includes:
[0020] The state detection module detects a power supply change signal of the processor;
[0021] The controller determines the power-on state of the processor based on the power supply change signal and the state control signal provided by the processor, and stores the power-on state in the dual-port RAM;
[0022] When determining that the processing system is powered on after power failure, the controller reads the preset power failure recovery strategy and the power-on state before power failure stored in the dual-port RAM, and determines whether to power on and start the processor based on the power failure recovery strategy and the power-on state before power failure.
[0023] Optionally, the processing system further includes a power module, which is electrically connected to the dual-port RAM, the controller, the state detection module and the processor; when the power module is working, it converts AC power into DC power, which is used to power the dual-port RAM, the controller and the state detection module, and to power the processor under the control of the controller;
[0024] The step of the controller determining whether to power on and start the processor based on the power-off recovery strategy and the power-on state before the power-off includes:
[0025] If the power failure recovery strategy is to start the machine when power is restored, directly control the power module to supply power to the processor so that the processor is powered on and started;
[0026] If the power failure recovery strategy is to maintain the state before power failure when power is restored and the power-on state before power failure is that the processor is in an unpowered state, then control the power module not to supply power to the processor;
[0027] If the power failure recovery strategy is to maintain the state before power failure when power is restored and the power-on state before power failure is that the processor is in the power-on state, controlling the power supply module to supply power to the processor so that the processor is powered on and started;
[0028] If the power failure recovery strategy is not to start the computer when power is restored, the power module is directly controlled not to supply power to the processor.
[0029] Optionally, the processing system further includes a power module, which is electrically connected to the dual-port RAM, the controller, the state detection module and the processor; when the power module is working, it converts AC power into DC power, which is used to power the dual-port RAM, the controller and the state detection module, and to power the processor under the control of the controller;
[0030] The dual-port RAM includes a strategy register and a status register, and the register values of the two registers respectively represent the power-off recovery strategy and the power-on status;
[0031] The controller, when determining that the processing system is powered on after power failure, reads the preset power failure recovery strategy and the power-on state before power failure stored in the dual-port RAM, and determines whether to power on and start the processor based on the power failure recovery strategy and the power-on state before power failure, including:
[0032] When it is determined that the processing system is powered on again after power failure, reading the policy register in the dual-port RAM;
[0033] If the register value of the strategy register is a first setting value, the power module is directly controlled to supply power to the processor so that the processor is powered on and started; the first setting value indicates that the power failure recovery strategy is to start the processor when power is restored;
[0034] If the register value of the strategy register is a second setting value, the power module is controlled not to supply power to the processor; the second setting value indicates that the power failure recovery strategy is not to start the computer when power is restored;
[0035] If the register value of the strategy register is the third setting value, then continue to read the status register in the dual-port RAM; the third setting value indicates that the power failure recovery strategy is to maintain the state before power failure when power is restored;
[0036] If the register value of the status register is a fourth setting value, the power module is controlled not to supply power to the processor; the fourth setting value indicates that the power-on state before the power failure is that the processor is in an unpowered state;
[0037] If the register value of the status register is a fifth setting value, the power module is controlled to supply power to the processor so that the processor is powered on and started; the fifth setting value indicates that the power-on state before power failure is that the processor is in a powered-on state.
[0038] In a third aspect, the present invention provides an electronic device, comprising the ARM architecture-based processing system as described in the first aspect.
[0039] Compared with the prior art, the embodiment of the present invention provides a power restoration management method, a processing system based on ARM architecture, and an electronic device, the processing system including a processor, a dual-port RAM, a controller, and a state detection module; the state detection module is used to detect the power supply change signal of the processor; the controller is electrically connected to the state detection module and the processor, and is used to determine the power-on state of the processor based on the power supply change signal and the state control signal provided by the processor, and store the power-on state in the dual-port RAM; the controller is electrically connected to the dual-port RAM, and is also used to read the preset power failure recovery strategy and the power-on state before power failure stored in the dual-port RAM when determining that the processing system is restored after power failure, and determine whether the processor is powered on and started based on the power failure recovery strategy and the power-on state before power failure. The present invention sets a dual-port RAM, a controller, and a state detection module in the processing system based on ARM architecture, so that the Restore after AC Power Loss function can be implemented in the processing system based on ARM architecture. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 The figure is a schematic diagram of the hardware structure that the computer device of the x86 architecture in the prior art relies on.
[0042] Figure 2 One of the structural schematic diagrams of a processing system based on ARM architecture provided in an embodiment of the present invention.
[0043] Figure 3 The second structural diagram of a processing system based on ARM architecture provided by an embodiment of the present invention.
[0044] Figure 4 A circuit structure diagram of a state detection module provided in an embodiment of the present invention.
[0045] Figure 5 One of the flowcharts of a power restoration management method provided by an embodiment of the present invention.
[0046] Figure 6 The second flowchart of a power restoration management method provided by an embodiment of the present invention.
[0047] Icon: 10-processing system; 100-processor; 200-dual-port RAM; 300-status detection module; 400-controller; 500-power module; 600-backup battery. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0049] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0051] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0052] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0053] See also Figure 2 , Figure 2 This is one of the structural diagrams of a processing system 10 based on ARM architecture provided in an embodiment of the present invention. The processing system 10 includes a processor 100 , a dual-port RAM 200 , a state detection module 300 and a controller 400 .
[0054] The state detection module 300 is electrically connected to the processor 100 and is used to detect a power supply change signal of the processor 100;
[0055] The controller 400 is electrically connected to the state detection module 300 and the processor 100, and is used to determine the power-on state of the processor 100 based on the power supply change signal and the state control signal provided by the processor 100, and store the power-on state in the dual-port RAM 200;
[0056] The controller 400 is electrically connected to the dual-port RAM 200, and is also used to read the preset power-off recovery strategy and the power-on status before power-off stored in the dual-port RAM 200 when determining that the processing system 10 is powered on after power failure, and determine whether the processor 100 is powered on and started based on the power-off recovery strategy and the power-on status before power failure.
[0057] The processing system 10 based on ARM architecture provided by the embodiment of the present invention includes a processor 100, a dual-port RAM 200, a controller 400 and a state detection module 300; the state detection module 300 is used to detect the power supply change signal of the processor 100; the controller 400 is electrically connected to the state detection module 300 and the processor 100, and is used to determine the power-on state of the processor 100 based on the power supply change signal and the state control signal provided by the processor 100, and store the power-on state in the dual-port RAM 200; the controller 400 is electrically connected to the dual-port RAM 200, and is also used to read the preset power-off recovery strategy and the power-on state before power-off stored in the dual-port RAM 200 when determining that the processing system 10 is restored after power failure, and determine whether the processor 100 is powered on and started based on the power-off recovery strategy and the power-on state before power failure. The present invention sets the dual-port RAM 200, the controller 400 and the state detection module 300 in the processing system 10 based on ARM architecture, so that the Restoreafter AC Power Loss function can be implemented in the processing system 10 based on ARM architecture.
[0058] For alternative implementations, see Figure 3 , Figure 3 The second structural diagram of a processing system 10 based on ARM architecture provided by an embodiment of the present invention. The processing system 10 may further include a power module 500 and a backup battery 600.
[0059] Among them, the power module 500 is electrically connected to the dual-port RAM 200, the controller 400, the status detection module 300 and the processor 100; the power module 500 can be used to convert AC power into DC power to power the dual-port RAM 200, the controller 400 and the status detection module 300, and to power the processor 100 under the control of the controller 400; the backup battery 600 is electrically connected to the dual-port RAM 200, and is used to power the dual-port RAM 200 when the processing system 10 loses power.
[0060] Optionally, the backup battery may be a button cell battery.
[0061] Optional, please continue to refer to Figure 3 The processor 100 may also be electrically connected to the dual-port RAM 200 to obtain a power-loss recovery strategy preset by a user and store it in the dual-port RAM 200 .
[0062] It can be understood that the power loss recovery strategy depends on the setting options configured by the user for Restore after AC Power Loss in the BIOS power management function, which can be divided into the following three situations:
[0063] (1) When the setting option is set to power on, the power failure recovery strategy is: turn on when power is restored;
[0064] (2) When the setting option is set to power off, the power failure recovery strategy is: do not start the machine when power is restored;
[0065] (3) When the setting option is set to last state, the power failure recovery strategy is: maintain the state before power failure when power is restored.
[0066] In an optional implementation, the dual-port RAM 200 may include a policy register and a status register, and the register values of the two registers represent the power-off recovery strategy and the power-on status respectively.
[0067] The register value in the strategy register is one of the first setting value, the second setting value and the third setting value. The first setting value indicates that the power loss recovery strategy is to turn on the machine when power is restored, and the second setting value indicates that the power loss recovery strategy is not to turn on the machine when power is restored; the third setting value indicates that the power loss recovery strategy is to maintain the state before power loss when power is restored.
[0068] The register value in the status register is a fourth setting value or a fifth setting value, the fourth setting value indicates that the power-on state is that the processor 100 is in an unpowered state, and the fifth setting value indicates that the power-on state is that the processor 100 is in a powered state.
[0069] It can be understood that when the processor 100 is in a powered-on state, the entire processing system 10 is considered to be in a powered-on state; when the processor 100 is in an unpowered state, the entire processing system 10 is considered to be in a powered-off state.
[0070] It should be noted that the specific values of the first set value to the fifth set value may be related to the number of register bits of the policy register and the status register. In an optional example, when the number of bits of the policy register and the status register is 2 and 1 respectively, the first set value may be 00, the second set value may be 01, and the third set value may be 10; the fourth set value may be 0, and the fifth set value may be 1. This example is only an example, and the embodiment of the present invention does not limit the number of bits of the two registers and the specific values of the first set value to the fifth set value.
[0071] Combination Figure 3The dual-port RAM 200 can be connected to the processor 100 and the controller 400 through an I2C bus. The controller 400 can be one of a BMC (Baseboard Management Controller), a CPLD (Complex Programmable Logic Device), and an EC (Embedded Controller).
[0072] It can be understood that when the processing system 10 is turned on and works normally, the state control signal is at a high level; when the processing system 10 is turned off, the state control signal is at a low level. That is, when the user controls the processing system 10 to shut down, the controller 400 senses that the state control signal provided by the processor 100 changes from a high level to a low level, and the controller 400 immediately controls the power module 500 to stop supplying power to the processor 100, thereby completing the shutdown; when the user controls the processing system 10 to start, the controller 400 senses that the state control signal provided by the processor 100 changes from a low level to a high level, and the controller 400 immediately controls the power module 500 to start supplying power to the processor 100, thereby completing the startup.
[0073] Optional, see Figure 4 , Figure 4 The circuit structure diagram of a state detection module 300 provided in an embodiment of the present invention is shown in FIG. The state detection module 300 may include a first resistor R1, a second resistor R2, a third resistor R3, a Zener diode Z1, and a comparator U1.
[0074] Among them, the anode of the Zener diode Z1 is grounded, and the cathode is connected to the reverse input terminal of the comparator U1; one end of the first resistor R1 is connected to the reverse input terminal of the comparator U1, and the other end is connected to the power supply voltage VCC provided by the power module 500 to the processor 100; one end of the second resistor R2 is connected to the power supply voltage VCC, and the other end is grounded through the third resistor R3 and connected to the positive input terminal of the comparator U1; the output terminal of the comparator U1 is connected to the controller 400.
[0075] The network formed by the first resistor R1 and the Zener diode U1 can generate an accurate reference voltage Vref provided to the reverse input terminal of the comparator U1. The second resistor R2 and the third resistor R3 form a voltage divider network to generate a divided voltage Input provided to the positive input terminal of the comparator U1.
[0076] When Vref<Input, the power supply change signal (i.e. Figure 4 INT# in is high level; when Vref>Input, the power supply change signal at the output of comparator U1 (i.e. Figure 4 INT# in is low level.
[0077] The resistance values of R2 and R3 need to be carefully designed. For example, assuming that VCC is 12V when the processing system 10 is powered on and working normally, R2 and R3 with appropriate resistance values can be selected so that when VCC drops to about 10V due to power failure, Input can be less than Vref.
[0078] The working principle of the state detection module 300 is as follows: when the power module 500 is working normally, Vref<Input, the power supply change signal (i.e. Figure 4 INT# in is high level; when AC Loss (i.e. AC power failure) occurs, the VCC provided by the power module 500 to the processor 100 will gradually decrease. When it decreases to a certain level, Vref>Input, so that the power supply change signal (i.e. Figure 4 INT# in the READ_ON / OFF switch changes from high to low.
[0079] Therefore, when the processing system 10 is in a normal startup state, the power change signal and the state control signal are both at a high level. At this time, the power-on state stored in the dual-port RAM 200 by the controller 400 is that the processor 100 is in a power-on state. If at a certain moment, the power change signal changes from a high level to a low level while the state control signal is still at a high level, it means that an AC Loss event occurs in the processing system 10 in the startup state.
[0080] When the processing system 10 is in the shutdown state, the power change signal is at a high level but the state control signal is at a low level. At this time, the power-on state stored in the dual-port RAM 200 by the controller 400 is that the processor 100 is in an unpowered state. If at a certain moment, the power change signal changes from a high level to a low level while the state control signal is still at a low level, it means that an AC Loss event occurs in the processing system 10 in the shutdown state.
[0081] It should be noted that Figure 2 and Figure 3 The processing system 10 shown in the figure includes one processor 100. If possible, the processing system 10 may also include multiple processors 100 (for example, two processors connected by an interconnection bus). The principle of power restoration after power failure is similar to the above description and is not repeated here.
[0082] Based on the above-mentioned ARM architecture-based processing system 10, the present invention further provides a power recovery management method, which is applied to the ARM architecture-based processing system 10, the processing system 10 includes a dual-port RAM 200, a processor 100, a controller 400 and a status detection module 300; the controller 400 is electrically connected to the status detection module 300, the processor 100 and the dual-port RAM 200, and the status detection module 300 is electrically connected to the processor 100. Figure 5 The method includes the following steps S100 to S300.
[0083] S100: The status detection module detects a power supply change signal of the processor.
[0084] S200: The controller determines the power-on state of the processor based on the power supply change signal and the state control signal provided by the processor, and stores the power-on state in the dual-port RAM.
[0085] S300: When determining that the processing system is powered on after power failure, the controller reads the preset power failure recovery strategy and the power-on state before power failure stored in the dual-port RAM, and determines whether the processor is powered on and started based on the power failure recovery strategy and the power-on state before power failure.
[0086] In an optional implementation, the processing system 10 may further include a power module 500, which is electrically connected to the dual-port RAM 200, the controller 400, the state detection module 300, and the processor 100; when the power module 500 is in operation, it converts AC power into DC power, which is used to power the dual-port RAM 200, the controller 400, and the state detection module 300, and to power the processor 100 under the control of the controller 400. Correspondingly, the process in which the controller 400 determines whether the processor 100 is powered on and started based on the power-off recovery strategy and the power-on state before the power-off in the above step S300 may include the following sub-steps S310 to S340.
[0087] S310: If the power failure recovery strategy is to start the machine when power is restored, the controller directly controls the power module to supply power to the processor so that the processor is powered on and started;
[0088] S320: If the power failure recovery strategy is to maintain the state before power failure when power is restored and the power-on state before power failure is that the processor is in an unpowered state, the controller controls the power module not to supply power to the processor;
[0089] S330: If the power failure recovery strategy is to maintain the state before power failure when power is restored and the power-on state before power failure is that the processor is in the power-on state, the controller controls the power module to supply power to the processor so that the processor is powered on and started;
[0090] S340: If the power failure recovery strategy is not to start the computer when power is restored, the controller directly controls the power module not to supply power to the processor.
[0091] When power is restored, the controller 400 executes one of the above steps S310 to S340 based on the power failure recovery strategy and the power-on state before the power failure, that is, completes a power restoration management process.
[0092] In an optional implementation, the dual-port RAM 200 may include a strategy register and a status register, and the register values of the two registers represent the power-off recovery strategy and the power-on status, respectively. Figure 5 Based on Figure 6 The sub-steps of the above step S300 may include S301 to S306.
[0093] S301, when the controller determines that the processing system is powered on after power failure, the controller reads the policy register in the dual-port RAM;
[0094] S302: If the register value of the strategy register is a first setting value, the controller directly controls the power module to supply power to the processor so that the processor is powered on and started; the first setting value indicates that the power failure recovery strategy is to start the processor when power is restored;
[0095] S303, if the register value of the strategy register is the second setting value, the controller controls the power module not to supply power to the processor; the second setting value indicates that the power failure recovery strategy is not to start the processor when power is restored;
[0096] S304, if the register value of the strategy register is the third setting value, the controller continues to read the status register in the dual-port RAM; the third setting value indicates that the power failure recovery strategy is to maintain the state before power failure when power is restored;
[0097] S305: If the register value of the status register is a fourth setting value, the controller controls the power module not to supply power to the processor; the fourth setting value indicates that the power-on state before power failure is that the processor is in an unpowered state;
[0098] S306. If the register value of the status register is the fifth setting value, the controller controls the power module to supply power to the processor so that the processor is powered on and started; the fifth setting value indicates that the power-on state before power failure is that the processor is in the power-on state.
[0099] The embodiment of the present invention further provides an electronic device, which includes the above-mentioned ARM architecture-based processing system 10. Optionally, the electronic device may be a server device or a PC device based on the ARM architecture.
[0100] In summary, the embodiments of the present invention provide a power restoration management method, a processing system 10 based on an ARM architecture, and an electronic device, wherein the processing system 10 includes a processor 100, a dual-port RAM 200, a controller 400, and a status detection module 300; the status detection module 300 is used to detect a power supply change signal of the processor 100; the controller 400 is electrically connected to the status detection module 300 and the processor 100, and is used to determine the power-on state of the processor 100 based on the power supply change signal and the status control signal provided by the processor 100, and store the power-on state in the dual-port RAM 200; the controller 400 is electrically connected to the dual-port RAM 200, and is also used to read the preset power-off recovery strategy and the power-on state before power-off stored in the dual-port RAM 200 when determining that the processing system 10 is powered on after power failure, and determine whether the processor 100 is powered on and started based on the power-off recovery strategy and the power-on state before power failure. The present invention sets a dual-port RAM 200 , a controller 400 and a state detection module 300 in the processing system 10 based on the ARM architecture, so that the Restore after AC Power Loss function can be implemented in the processing system 10 based on the ARM architecture.
[0101] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A processing system based on ARM architecture, It is characterized in that The processing system includes a processor, a dual-port RAM, a controller and a status detection module; The state detection module is electrically connected to the processor and is used to detect a power supply change signal of the processor; The controller is electrically connected to the state detection module and the processor, and is used to determine the power-on state of the processor based on the power supply change signal and the state control signal provided by the processor, and store the power-on state in the dual-port RAM; The controller is electrically connected to the dual-port RAM, and is also used to read the preset power-off recovery strategy and the power-on state before power-off stored in the dual-port RAM when it is determined that the processing system is powered on after power failure, and determine whether the processor is powered on and started based on the power-off recovery strategy and the power-on state before power failure.
2. The system according to claim 1, It is characterized in that The dual-port RAM includes a strategy register and a status register, and the register values of the two registers respectively represent the power-off recovery strategy and the power-on status; The register value in the strategy register is one of a first setting value, a second setting value and a third setting value, wherein the first setting value indicates that the power failure recovery strategy is to turn on the machine when power is restored, and the second setting value indicates that the power failure recovery strategy is not to turn on the machine when power is restored; and the third setting value indicates that the power failure recovery strategy is to maintain the state before power failure when power is restored; The register value in the status register is a fourth set value or a fifth set value, the fourth set value indicates that the power-on state is that the processor is in an unpowered state, and the fifth set value indicates that the power-on state is that the processor is in a powered state.
3. The system according to claim 2, It is characterized in that The number of bits of the strategy register and the status register are 2 and 1 respectively.
4. The system according to claim 3, It is characterized in that The first setting value is 00, the second setting value is 01, the third setting value is 10; the fourth setting value is 0, and the fifth setting value is 1.
5. The system according to claim 1, It is characterized in that The processing system also includes a power module and a backup battery; The power module is electrically connected to the dual-port RAM, the controller, the status detection module and the processor; the power module is used to convert AC power into DC power to power the dual-port RAM, the controller and the status detection module, and to power the processor under the control of the controller; The backup battery is electrically connected to the dual-port RAM and is used to supply power to the dual-port RAM when the processing system loses power.
6. The system according to claim 1, It is characterized in that The processor is also electrically connected to the dual-port RAM, and is used to store the power-loss recovery strategy preset by the user in the dual-port RAM.
7. A power restoration management method, It is characterized in that Applied to a processing system based on ARM architecture, the processing system includes a dual-port RAM, a processor, a controller and a status detection module; The controller is electrically connected to the state detection module, the processor and the dual-port RAM, and the state detection module is electrically connected to the processor; the method comprises: The state detection module detects a power supply change signal of the processor; The controller determines the power-on state of the processor based on the power supply change signal and the state control signal provided by the processor, and stores the power-on state in the dual-port RAM; When determining that the processing system is powered on after power failure, the controller reads the preset power failure recovery strategy and the power-on state before power failure stored in the dual-port RAM, and determines whether to power on and start the processor based on the power failure recovery strategy and the power-on state before power failure.
8. The method according to claim 7, It is characterized in that The processing system further includes a power module, which is electrically connected to the dual-port RAM, the controller, the state detection module and the processor; when the power module is in operation, it converts AC power into DC power, which is used to power the dual-port RAM, the controller and the state detection module, and to power the processor under the control of the controller; The step of the controller determining whether to power on and start the processor based on the power-off recovery strategy and the power-on state before the power-off includes: If the power failure recovery strategy is to start the machine when power is restored, directly control the power module to supply power to the processor so that the processor is powered on and started; If the power failure recovery strategy is to maintain the state before power failure when power is restored and the power-on state before power failure is that the processor is in an unpowered state, then control the power module not to supply power to the processor; If the power failure recovery strategy is to maintain the state before power failure when power is restored and the power-on state before power failure is that the processor is in the power-on state, controlling the power supply module to supply power to the processor so that the processor is powered on and started; If the power failure recovery strategy is not to start the computer when power is restored, the power module is directly controlled not to supply power to the processor.
9. The method according to claim 7, It is characterized in that The processing system further includes a power module, which is electrically connected to the dual-port RAM, the controller, the state detection module and the processor; when the power module is in operation, it converts AC power into DC power, which is used to power the dual-port RAM, the controller and the state detection module, and to power the processor under the control of the controller; The dual-port RAM includes a strategy register and a status register, and the register values of the two registers respectively represent the power-off recovery strategy and the power-on status; The controller, when determining that the processing system is powered on after power failure, reads the preset power failure recovery strategy and the power-on state before power failure stored in the dual-port RAM, and determines whether to power on and start the processor based on the power failure recovery strategy and the power-on state before power failure, including: When it is determined that the processing system is powered on again after power failure, reading the policy register in the dual-port RAM; If the register value of the strategy register is a first setting value, the power module is directly controlled to supply power to the processor so that the processor is powered on and started; the first setting value indicates that the power failure recovery strategy is to start the processor when power is restored; If the register value of the strategy register is a second setting value, the power module is controlled not to supply power to the processor; the second setting value indicates that the power failure recovery strategy is not to start the computer when power is restored; If the register value of the strategy register is the third setting value, then continue to read the status register in the dual-port RAM; the third setting value indicates that the power failure recovery strategy is to maintain the state before power failure when power is restored; If the register value of the status register is a fourth setting value, the power module is controlled not to supply power to the processor; the fourth setting value indicates that the power-on state before the power failure is that the processor is in an unpowered state; If the register value of the status register is a fifth setting value, the power module is controlled to supply power to the processor so that the processor is powered on and started; the fifth setting value indicates that the power-on state before power failure is that the processor is in a powered-on state.
10. An electronic device, It is characterized in that The electronic device comprises an ARM architecture-based processing system as described in any one of claims 1-6.
