CN100380282C - Power saving method and system for CPU - Google Patents
Power saving method and system for CPU Download PDFInfo
- Publication number
- CN100380282C CN100380282C CNB2006100582934A CN200610058293A CN100380282C CN 100380282 C CN100380282 C CN 100380282C CN B2006100582934 A CNB2006100582934 A CN B2006100582934A CN 200610058293 A CN200610058293 A CN 200610058293A CN 100380282 C CN100380282 C CN 100380282C
- Authority
- CN
- China
- Prior art keywords
- processing unit
- central processing
- event
- state
- system management
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000012545 processing Methods 0.000 claims abstract description 278
- 230000002093 peripheral effect Effects 0.000 claims abstract description 35
- 230000007958 sleep Effects 0.000 claims abstract description 14
- 244000144985 peep Species 0.000 claims abstract 3
- 238000007726 management method Methods 0.000 claims description 79
- 230000008569 process Effects 0.000 claims description 8
- 238000004148 unit process Methods 0.000 claims 2
- 230000006266 hibernation Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 4
- 230000007547 defect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 102100022704 Amyloid-beta precursor protein Human genes 0.000 description 2
- 101000823051 Homo sapiens Amyloid-beta precursor protein Proteins 0.000 description 2
- DZHSAHHDTRWUTF-SIQRNXPUSA-N amyloid-beta polypeptide 42 Chemical compound C([C@@H](C(=O)N[C@@H](C)C(=O)N[C@@H](CCC(O)=O)C(=O)N[C@@H](CC(O)=O)C(=O)N[C@H](C(=O)NCC(=O)N[C@@H](CO)C(=O)N[C@@H](CC(N)=O)C(=O)N[C@@H](CCCCN)C(=O)NCC(=O)N[C@@H](C)C(=O)N[C@H](C(=O)N[C@@H]([C@@H](C)CC)C(=O)NCC(=O)N[C@@H](CC(C)C)C(=O)N[C@@H](CCSC)C(=O)N[C@@H](C(C)C)C(=O)NCC(=O)NCC(=O)N[C@@H](C(C)C)C(=O)N[C@@H](C(C)C)C(=O)N[C@@H]([C@@H](C)CC)C(=O)N[C@@H](C)C(O)=O)[C@@H](C)CC)C(C)C)NC(=O)[C@H](CC=1C=CC=CC=1)NC(=O)[C@@H](NC(=O)[C@H](CC(C)C)NC(=O)[C@H](CCCCN)NC(=O)[C@H](CCC(N)=O)NC(=O)[C@H](CC=1N=CNC=1)NC(=O)[C@H](CC=1N=CNC=1)NC(=O)[C@@H](NC(=O)[C@H](CCC(O)=O)NC(=O)[C@H](CC=1C=CC(O)=CC=1)NC(=O)CNC(=O)[C@H](CO)NC(=O)[C@H](CC(O)=O)NC(=O)[C@H](CC=1N=CNC=1)NC(=O)[C@H](CCCNC(N)=N)NC(=O)[C@H](CC=1C=CC=CC=1)NC(=O)[C@H](CCC(O)=O)NC(=O)[C@H](C)NC(=O)[C@@H](N)CC(O)=O)C(C)C)C(C)C)C1=CC=CC=C1 DZHSAHHDTRWUTF-SIQRNXPUSA-N 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 208000008918 voyeurism Diseases 0.000 description 1
Images
Landscapes
- Power Sources (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种节省电源方法及系统,特别是涉及一种中央处理单元的节省电源方法及系统,以节省中央处理单元的电源。The invention relates to a method and system for saving power, in particular to a method and system for saving power of a central processing unit, so as to save the power of the central processing unit.
背景技术 Background technique
随着计算机(电脑)系统技术的进步,计算机系统所拥有的功能越来越为强大周全,也因如此带给现今民众相当多的便利。现今计算机系统因为已朝向多媒体服务方向发展所以除了可以帮民众处理事务外亦可提供民众娱乐消遣。现今计算机系统功能越趋强大周全相对中央处理单元处理速度也日益提升,所以中央处理单元所消耗的电源也日益增加,这对必须藉由电池供电的携带式计算机而言是一项重要问题。因为电池的电源消耗快相对会减少携带式计算机使用的时间,如此会对使用民众在使用携带式计算机上造成影响。Along with the advancement of computer (computer) system technology, the function that computer system possesses is more and more powerful and comprehensive, and because of this, it brings quite a lot of convenience to the people today. Today's computer systems are not only able to help people handle affairs but also provide people with entertainment because they have developed towards the direction of multimedia services. Nowadays, the functions of computer systems are becoming more and more powerful and comprehensive, and the processing speed of the central processing unit is also increasing day by day, so the power consumed by the central processing unit is also increasing day by day, which is an important issue for portable computers that must be powered by batteries. Because the power consumption of the battery will relatively reduce the use time of the portable computer, this will affect the use of the portable computer by the users.
基于上述理由现今计算机系统皆设有电源管理系统,现今常用的电源管理系统有高级电源管理(Advanced Power Management,APM)与先进架构电源介面(Advanced Configuration and Power Interface,ACPI)两种,其中以藉由作业系统进行电源管理的ACPI效率最佳。ACPI电源管理分成四种状态,分别是系统状态G(Global)、装置状态D(Device)、休眠状态S(Sleeping)以及中央处理单元状态C(CPU)。Based on the above reasons, today’s computer systems are equipped with power management systems. The commonly used power management systems today include Advanced Power Management (APM) and Advanced Configuration and Power Interface (ACPI). ACPI with power management by the operating system is most efficient. ACPI power management is divided into four states, which are system state G (Global), device state D (Device), sleep state S (Sleeping), and central processing unit state C (CPU).
请参阅图1所示,是现有习知技术的先进架构电源介面的中央处理单元次态图。如图所示,ACPI的中央处理单元状态包含有C0、C1、C2、C 3四层级,C0状态为中央处理单元可执行指令的处理状态,而C1、C2、C3状态分别为不同层级的休眠状态,计算机系统的作业系统会依据中央处理单元的使用状态驱使中央处理单元进入适当层级的休眠状态以节省电源。Please refer to FIG. 1 , which is a state diagram of a central processing unit of an advanced architecture power interface in the prior art. As shown in the figure, ACPI’s central processing unit state includes four levels of C0, C1, C2, and C3. The C0 state is the processing state of the central processing unit’s executable instructions, and the C1, C2, and C3 states are different levels of sleep. state, the operating system of the computer system will drive the central processing unit to enter a sleep state of an appropriate level according to the usage state of the central processing unit to save power.
上述的C1、C2与C3状态中,因为C3状态为无法窥视(non-snoop)事件的休眠状态,所以中央处理单元处于C3状态时是无法处理任何事件,而处于完全休眠状态,所以C3状态为最省电的休眠状态。中央处理单元进入C3状态后计算机系统的系统晶片接收耦接的周边装置所发送的一中断(Interrupt)事件或者一汇流排主控器要求(Bus Master Request)事件时,中央处理单元即会离开C3状态而回复至C0状态以处理中断事件或者汇流排主控器要求事件。之后,中央处理单元的使用状态必须达到进入C3状态的条件时,作业系统才会再度驱使中央处理单元进入C3状态。In the above C1, C2 and C3 states, because the C3 state is a dormant state in which no snooping (non-snoop) events are possible, the central processing unit in the C3 state cannot process any events and is in a complete dormant state, so the C3 state is The most power-efficient sleep state. After the central processing unit enters the C3 state, when the system chip of the computer system receives an interrupt (Interrupt) event sent by the coupled peripheral device or a bus master request (Bus Master Request) event, the central processing unit will leave C3 state and reverts to the C0 state to handle interrupt events or bus master request events. Afterwards, the operating system will drive the central processing unit to enter the C3 state again only when the usage state of the central processing unit meets the conditions for entering the C3 state.
但是,汇流排主控器要求事件仅是周边装置欲读取系统记忆体(记忆体即存储介质,存储器,内存,以下均称为记忆体)的资料而发出的处理事件,却由于为了处理该事件而离开C3状态至C0状态,之后又要等待中央处理单元达到进入C3的条件后才得以进入C3状态,如此中央处理单元待在C0状态等待进入C3状态的时间将导致中央处理单元耗费较多的电源。所以中央处理单元无法达到最大的省电效率,此问题对携带式计算机而言将会降低使用时间,且会对使用者在使用携带式计算机上造成影响。However, the event required by the bus master is only a processing event sent by the peripheral device to read the data of the system memory (memory is the storage medium, memory, internal memory, hereinafter referred to as memory), but due to the processing of the event event and leave the C3 state to the C0 state, and then wait for the central processing unit to meet the conditions to enter the C3 state before entering the C3 state, so the central processing unit waits in the C0 state to enter the C3 state. The time will cause the central processing unit to consume more power supply. Therefore, the central processing unit cannot achieve the maximum power-saving efficiency. This problem will reduce the use time of the portable computer and affect the user's use of the portable computer.
由此可见,上述现有的中央处理单元的节省电源方法及系统在方法、产品结构及使用上,显然仍存在有不便与缺陷,而亟待加以进一步改进。为了解决上述问题,相关厂商莫不费尽心思来谋求解决之道,但长久以来一直未见适用的设计被发展完成,而一般方法及产品又没有适切的方法及结构能够解决上述问题,此显然是相关业者急欲解决的问题。因此如何能创设一种新的中央处理单元的节省电源方法及系统,便成了当前业界极需改进的目标。It can be seen that the above-mentioned existing power-saving method and system of the central processing unit obviously still have inconveniences and defects in the method, product structure and use, and need to be further improved urgently. In order to solve the above-mentioned problems, relevant manufacturers have tried their best to find a solution, but no suitable design has been developed for a long time, and there is no suitable method and structure for general methods and products to solve the above-mentioned problems. This is obvious. It is a problem that relevant industry players are eager to solve. Therefore, how to create a new method and system for saving power of the central processing unit has become a goal that needs to be improved in the current industry.
有鉴于上述现有的中央处理单元的节省电源方法及系统存在缺陷,因此,本发明针对上述问题而提出一种新的中央处理单元的节省电源方法及系统,让中央处理单元可在离开无法窥视事件的休眠状态处理完汇流排主控器要求事件后,立即回复至无法窥视事件的休眠状态,藉以增加省电效率进而提高携带式计算机的使用时间,以解决上述问题。In view of the defects in the above-mentioned existing method and system for saving power of the central processing unit, the present invention proposes a new method and system for saving power of the central processing unit in view of the above-mentioned problems, so that the central processing unit can be left without peeping The dormant state of the event returns to the dormant state where the event cannot be peeped after processing the event required by the bus master, so as to increase the power saving efficiency and improve the use time of the portable computer, so as to solve the above problems.
发明内容 Contents of the invention
本发明的主要目的在于,克服现有的中央处理单元的节省电源方法及系统存在的缺陷,而提供一种新的中央处理单元的节省电源方法及系统,所要解决的技术问题是使其让中央处理单元在处于无法窥视事件的休眠状态下且周边装置发出汇流排主控器要求事件时,离开无法窥视事件的休眠状态进入可执行指令的处理状态并且进入一系统管理模式,以处理汇流排主控器要求事件,且在完成处理后藉由中央处理单元在系统管理模式执行系统管理中断程式驱使中央处理单元返回无法窥视事件的休眠状态,而可以达到最佳省电的目的,从而更加适于实用。The main purpose of the present invention is to overcome the defects of the existing power saving method and system of the central processing unit, and provide a new power saving method and system of the central processing unit. The technical problem to be solved is to make the central processing unit When the processing unit is in the sleep state where events cannot be peeked and the peripheral device sends a bus master request event, it leaves the sleep state where events cannot be peeked and enters a processing state for executable instructions and enters a system management mode to process the bus master. The controller requests an event, and after the processing is completed, the central processing unit executes the system management interrupt program in the system management mode to drive the central processing unit to return to the dormant state where the event cannot be peeped, so as to achieve the best power saving purpose, which is more suitable for practical.
本发明的目的及解决其技术问题是采用以下的技术方案来实现的。依据本发明提出的一种中央处理单元的节省电源方法,运用于一中央处理单元处于一先进架构电源介面的C3状态且一周边装置发出一汇流排主控器要求事件时,该方法包括以下的步骤:发送一第一控制讯息与一系统管理中断讯息至该中央处理单元,驱使该中央处理单元离开该先进架构电源介面的C3状态进入一先进架构电源介面的C0状态与一系统管理模式,并写入一第一设定值至一第一暂存器;以及开启一仲裁器,以传输该汇流排主控器要求事件至该中央处理单元进行处理;其中,该中央处理单元处理完该汇流排主控器要求事件时,关闭该仲裁器并清除该第一设定值,该中央处理单元侦测该第一设定值被清除后,执行一系统管理中断程式以发送一第二控制讯息至该中央处理单元,驱使该中央处理单元回复进入该先进架构电源介面的C3状态。The purpose of the present invention and the solution to its technical problems are achieved by adopting the following technical solutions. According to the power saving method of a central processing unit proposed by the present invention, when a central processing unit is in the C3 state of an advanced architecture power interface and a peripheral device sends a bus master request event, the method includes the following Steps: sending a first control message and a system management interrupt message to the central processing unit, driving the central processing unit to leave the C3 state of the AAPI to enter a C0 state of the API and a system management mode, and writing a first setting value to a first register; and turning on an arbiter to transmit the bus master request event to the central processing unit for processing; wherein, the central processing unit finishes processing the bus When the main controller requests an event, the arbitrator is closed and the first setting value is cleared, and after the central processing unit detects that the first setting value is cleared, it executes a system management interrupt program to send a second control message to the central processing unit, driving the central processing unit to return to the C3 state of the advanced architecture power interface.
本发明的目的及解决其技术问题还可采用以下技术措施进一步实现。The purpose of the present invention and its technical problems can also be further realized by adopting the following technical measures.
前述的中央处理单元的节省电源方法,其中所述的中央处理单元回复进入该先进架构电源介面的C3状态后,若该周边装置发送一中断事件时,该中央处理单元离开该系统管理模式,并发送该第一控制讯息至该中央处理单元以离开该先进架构电源介面的C3状态进入该先进架构电源介面的C0状态且开启该仲裁器,以传输该中断事件至该中央处理单元进行处理。In the aforementioned method for saving power of a central processing unit, after the central processing unit returns to the C3 state of the Advanced Architecture Power Interface, if the peripheral device sends an interrupt event, the central processing unit leaves the system management mode, and Sending the first control message to the CPU to leave the C3 state of the APPI to enter the C0 state of the APPI and turn on the arbiter to transmit the interrupt event to the CPU for processing.
前述的中央处理单元的节省电源方法,其中所述的周边装置发送该中断事件时,写入一第二设定值至一第二暂存器,该中央处理单元依据该第二设定值离开该系统管理模式并清除该第二设定值。In the aforementioned power saving method of the central processing unit, when the peripheral device sends the interrupt event, it writes a second set value into a second temporary register, and the central processing unit exits according to the second set value The system is in management mode and clears the second set value.
前述的中央处理单元的节省电源方法,其中所述的系统管理中断程式储存于一记忆体。In the aforementioned method for saving power of a central processing unit, the system management interrupt program is stored in a memory.
本发明的目的及解决其技术问题还采用以下技术方案来实现。依据本发明提出的一种中央处理单元的节省电源方法,运用于一中央处理单元处于一无法窥视(non-snoop)事件的休眠状态且一周边装置发出一汇流排主控器要求事件时,该方法包括以下的步骤:发送一第一控制讯息与一系统管理中断讯息至该中央处理单元,驱使该中央处理单元离开该无法窥视事件的休眠状态进入一可执行指令的处理状态与一系统管理模式,并写入一第一设定值至一第一暂存器;以及开启一仲裁器,以传输该汇流排主控器要求事件至该中央处理单元进行处理;其中,该中央处理单元处理完该汇流排主控器要求事件时,关闭该仲裁器并清除该第一设定值,该中央处理单元侦测该第一设定值被清除后,执行一系统管理中断程式以发送一第二控制讯息至该中央处理单元,驱使该中央处理单元回复进入该无法窥视事件的休眠状态。The purpose of the present invention and the solution to its technical problem also adopt the following technical solutions to achieve. According to the power saving method of a central processing unit proposed by the present invention, when a central processing unit is in a dormant state in which a non-snoop event is impossible and a peripheral device sends a bus master request event, the The method includes the following steps: sending a first control message and a system management interrupt message to the central processing unit, driving the central processing unit to leave the dormant state where events cannot be peeped into an executable instruction processing state and a system management mode , and write a first setting value to a first temporary register; and open an arbitrator to transmit the bus master request event to the central processing unit for processing; wherein, the central processing unit finishes processing When the bus master requests an event, it closes the arbiter and clears the first set value. After the central processing unit detects that the first set value is cleared, it executes a system management interrupt program to send a second A control message is sent to the central processing unit, driving the central processing unit to return to the dormant state of the event that cannot be peeped.
本发明的目的及解决其技术问题还可采用以下技术措施进一步实现。The purpose of the present invention and its technical problems can also be further realized by adopting the following technical measures.
前述的中央处理单元的节省电源方法,其中所述的中央处理单元回复进入该无法窥视事件的休眠状态后,若该周边装置发送一中断事件时,该中央处理单元离开该系统管理模式,并发送该第一控制讯息至该中央处理单元以离开该无法窥视事件的休眠状态进入该可执行指令的处理状态且开启该仲裁器,以传输该中断事件至该中央处理单元进行处理。The aforementioned method for saving power of the central processing unit, wherein after the central processing unit returns to the dormant state where the event cannot be peeped, if the peripheral device sends an interrupt event, the central processing unit leaves the system management mode and sends The first control message is sent to the central processing unit to leave the dormant state where the event cannot be peeked into the processing state of the executable instruction and to enable the arbiter to transmit the interrupt event to the central processing unit for processing.
前述的中央处理单元的节省电源方法,其中所述的周边装置发送该中断事件时,写入一第二设定值至一第二暂存器,该中央处理单元依据该第二设定值离开该系统管理模式并清除该第二设定值。In the aforementioned power saving method of the central processing unit, when the peripheral device sends the interrupt event, it writes a second set value into a second temporary register, and the central processing unit exits according to the second set value The system is in management mode and clears the second set value.
前述的中央处理单元的节省电源方法,其中所述的系统管理中断程式储存于一记忆体。In the aforementioned method for saving power of a central processing unit, the system management interrupt program is stored in a memory.
本发明的目的及解决其技术问题另外还采用以下技术方案来实现。依据本发明提出的一种中央处理单元的节省电源系统,运用于一中央处理单元处于一无法窥视(non-snoop)事件的休眠状态且一周边装置发出一汇流排主控器要求事件时,该系统包含有:一记忆体,储存一系统管理中断程式,供该中央处理单元执行;一仲裁器,传输该汇流排主控器要求事件至该中央处理单元;以及一系统晶片,发送一第一控制讯息与一系统管理中断讯息至该中央处理单元,驱使该中央处理单元离开该无法窥视事件的休眠状态并进入一可执行指令的处理状态与一系统管理模式,并写入第一设定值至一第一暂存器,以处理该汇流排主控器要求事件;其中,该中央处理单元进入该可执行指令的处理状态时,开启该仲裁器传输该汇流排主控器要求事件至该中央处理单元进行处理,处理完该汇流排主控器要求事件时,关闭该仲裁器并清除该第一设定值,该中央处理单元侦测该第一设定值被清除后,执行该系统管理中断程式以发送一第二控制讯息至该中央处理单元,驱使该中央处理单元回复进入该无法窥视事件的休眠状态。The purpose of the present invention and the solution to its technical problems are also achieved by the following technical solutions. According to the power saving system of a central processing unit proposed by the present invention, when a central processing unit is in a dormant state where a non-snoop event is impossible and a peripheral device sends a bus master request event, the The system includes: a memory, storing a system management interrupt program for the central processing unit to execute; an arbiter, transmitting the bus master request event to the central processing unit; and a system chip, sending a first A control message and a system management interrupt message are sent to the central processing unit to drive the central processing unit to leave the dormant state where the event cannot be peeped into and enter an executable command processing state and a system management mode, and write the first setting value to a first register for processing the bus master request event; wherein, when the central processing unit enters the processing state of the executable instruction, the arbitrator is turned on to transmit the bus master request event to the The central processing unit performs processing. When the bus master request event is processed, the arbitrator is closed and the first setting value is cleared. After the central processing unit detects that the first setting value is cleared, it executes the system The interrupt program is managed to send a second control message to the central processing unit to drive the central processing unit back into the dormant state of the unpeepable event.
本发明的目的及解决其技术问题还可采用以下技术措施进一步实现。The purpose of the present invention and its technical problems can also be further realized by adopting the following technical measures.
前述的中央处理单元的节省电源系统,其中所述的第一暂存器设置于该系统晶片。In the power saving system of the central processing unit mentioned above, the first register is set on the system chip.
前述的中央处理单元的节省电源系统,其中所述的中央处理单元回复进入该无法窥视事件的休眠状态后,若该周边装置发送一中断事件时,该中央处理单元离开该系统管理模式,该系统晶片并发送该第一控制讯息至该中央处理单元以离开该无法窥视事件的休眠状态进入该可执行指令的处理状态且开启该仲裁器,以传输该中断事件至该中央处理单元进行处理。In the aforementioned central processing unit power saving system, after the central processing unit returns to the dormant state where the event cannot be peeped, if the peripheral device sends an interrupt event, the central processing unit leaves the system management mode, and the system The chip sends the first control message to the central processing unit to leave the dormant state where the event cannot be peeked into the processing state of the executable instruction and turns on the arbiter to transmit the interrupt event to the central processing unit for processing.
前述的中央处理单元的节省电源系统,其更包含有:一第二暂存器,储存一第二设定值,该周边装置发送该中断事件时,该系统晶片写入一第二设定值至该第二暂存器,该中央处理单元依据该第二设定值离开该系统管理模式且清除该第二设定值。The power saving system of the aforementioned central processing unit further includes: a second temporary register storing a second setting value, when the peripheral device sends the interrupt event, the system chip writes a second setting value To the second register, the central processing unit exits the system management mode according to the second setting value and clears the second setting value.
前述的中央处理单元的节省电源系统,其中所述的第二暂存器设置于该系统晶片。In the power saving system of the central processing unit mentioned above, the second register is set on the system chip.
前述的中央处理单元的节省电源系统,其中所述的仲裁器设置于该系统晶片。In the aforementioned power saving system of the central processing unit, the arbitrator is disposed on the system chip.
本发明与现有技术相比具有明显的优点和有益效果。由以上技术方案可知,本发明的中央处理单元的节省电源方法及系统,主要运用于中央处理单元处于无法窥视事件的C3状态且一周边装置发出一汇流排主控器要求事件欲进行处理时。本发明藉由一系统晶片发送一第一控制讯息与一系统管理中断讯息至中央处理单元,以驱使中央处理单元离开C3状态进入一可执行指令的C0状态与一系统管理模式;之后,开启一仲裁器以传输汇流排主控器要求事件至中央处理单元进行处理。当中央处理单元处理完成汇流排主控器要求事件后,即关闭仲裁器且执行一系统管理中断程式以驱使中央处理单元恢复进入C3状态,进而可以达成省电的目的。当中央处理单元返回C3状态后,若周边装置发送一中断事件欲进行处理时,中央处理单元离开系统管理模式,并且离开C3状态进入C0状态以处理中断事件。Compared with the prior art, the present invention has obvious advantages and beneficial effects. It can be seen from the above technical solutions that the power saving method and system of the central processing unit of the present invention are mainly used when the central processing unit is in the C3 state where the event cannot be peeped and a peripheral device sends a bus master to request an event to be processed. The present invention uses a system chip to send a first control message and a system management interrupt message to the central processing unit, so as to drive the central processing unit to leave the C3 state and enter a C0 state of an executable command and a system management mode; after that, open a The arbiter transmits the bus master request event to the central processing unit for processing. After the central processing unit finishes processing the request event of the bus master, it closes the arbiter and executes a system management interrupt program to drive the central processing unit back into the C3 state, thereby achieving the purpose of power saving. After the central processing unit returns to the C3 state, if the peripheral device sends an interrupt event to be processed, the central processing unit leaves the system management mode, and leaves the C3 state and enters the C0 state to process the interrupt event.
借由上述技术方案,本发明中央处理单元的节省电源方法及系统至少具有下列优点:本发明主要应用在中央处理单元进入无法窥视事件的C3状态后若周边装置发出汇流排主控器要求事件时,本发明让中央处理单元离开C3状态进入可执行指令的处理状态以处理汇流排主控器要求事件,且进入系统管理模式以脱离作业系统控管。所以中央处理单元在完成处理汇流排主控器要求事件后,即可藉由中央处理单元在系统管理模式执行系统管理中断程式,驱使中央处理单元立即返回进入C3状态。如此即可以减少中央处理单元损耗电能,进而能够达成节能的目的,可以增加携带式计算机的电池的续航时间。另外本发明还可以节省桌上型计算机的用电量,进而完善达到计算机节能的目的,非常适于实用。By means of the above-mentioned technical solution, the power saving method and system of the central processing unit of the present invention have at least the following advantages: the present invention is mainly applied when the central processing unit enters the C3 state where events cannot be peeped, and if the peripheral device sends a bus master request event , the present invention allows the central processing unit to leave the C3 state and enter the processing state of the executable instruction to process the event required by the bus master controller, and enter the system management mode to escape from the control of the operating system. Therefore, after the central processing unit finishes processing the request event of the bus master, the central processing unit can execute the system management interrupt program in the system management mode to drive the central processing unit to return to the C3 state immediately. In this way, the power consumption of the central processing unit can be reduced, and the purpose of energy saving can be achieved, and the battery life of the portable computer can be increased. In addition, the present invention can also save the power consumption of the desktop computer, and further perfect the purpose of computer energy saving, which is very suitable for practical use.
综上所述,本发明是有关一种中央处理单元的节省电源方法及系统,用于一中央处理单元处于一无法窥视(non-snoop)事件的休眠状态,且一周边装置发出一汇流排主控器要求事件时,本发明的一系统晶片先驱使中央处理单元离开无法窥视事件的休眠状态进入一可执行指令的处理状态与一系统管理模式;之后,开启一仲裁器以传输汇流排主控器要求事件至中央处理单元进行处理。当中央处理单元处理完汇流排主控器要求事件后即关闭仲裁器并执行一系统管理中断程式,以驱使中央处理单元恢复进入无法窥视事件的休眠状态,如此即可以达到最佳省电的目的。本发明具有上述诸多优点及实用价值,其不论在方法、产品结构或功能上皆有较大改进,在技术上有较大进步,并产生了好用及实用的效果,且较现有的中央处理单元的节省电源方法及系统具有增进的功效,从而更加适于实用,并具有产业的广泛利用价值,诚为一新颖、进步、实用的新设计。To sum up, the present invention relates to a method and system for saving power of a central processing unit, which is used for a central processing unit in a sleep state where a non-snoop event is not possible, and a peripheral device sends a bus master When the controller requires an event, a system chip of the present invention firstly causes the central processing unit to leave the sleep state where the event cannot be peeped into an executable instruction processing state and a system management mode; after that, an arbiter is turned on to transmit the bus master The server requests events to the central processing unit for processing. After the central processing unit has processed the bus master request event, it will close the arbiter and execute a system management interrupt program to drive the central processing unit back into the sleep state where the event cannot be peeped, so that the best power saving can be achieved . The present invention has the advantages and practical value mentioned above. No matter the method, the structure of the product or the function, it has great improvement, and it has made great progress in technology, and has produced easy-to-use and practical effects, and compared with the existing central The power-saving method and system of the processing unit have enhanced efficacy, are more suitable for practical use, and have wide application value in the industry. They are a novel, progressive and practical new design.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其他目的、特征和优点能够更明显易懂,以下特举较佳实施例,并配合附图,详细说明如下。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the following preferred embodiments are specifically cited below, and are described in detail as follows in conjunction with the accompanying drawings.
附图说明 Description of drawings
图1是现有习知技术的先进架构电源介面的中央处理单元状态图。FIG. 1 is a state diagram of a central processing unit of an advanced architecture power interface in the prior art.
图2是本发明一较佳实施例的方块图。Fig. 2 is a block diagram of a preferred embodiment of the present invention.
图3是本发明一较佳实施例的流程图。Fig. 3 is a flowchart of a preferred embodiment of the present invention.
10:中央处理单元 30:系统晶片10: Central processing unit 30: System chip
31:周边装置 33:仲裁器31: Peripheral device 33: Arbitrator
35:第一暂存器 37:第二暂存器35: The first register 37: The second register
39:系统记忆体 40:只读记忆体39: System memory 40: Read-only memory
具体实施方式 Detailed ways
为更进一步阐述本发明为达成预定发明目的所采取的技术手段及功效,以下结合附图及较佳实施例,对依据本发明提出的中央处理单元的节省电源方法及系统其具体实施方式、方法、步骤、结构、特征及其功效,详细说明如后。In order to further explain the technical means and effects that the present invention takes to achieve the intended purpose of the invention, below in conjunction with the accompanying drawings and preferred embodiments, the specific implementation methods and methods of the power saving method and system of the central processing unit proposed according to the present invention , step, structure, feature and effect thereof, detailed description is as follows.
请参阅图2所示,是本发明一较佳实施例的方块图。如图所示,本发明实施例包含有一中央处理单元10、一系统晶片30与一系统记忆体39。该系统晶片30分别与中央处理单元10和系统记忆体39耦接以传递讯息与资料。此外,该系统晶片30更耦接有一只读记忆体40与一周边装置31,并设有一仲裁器33、一第一暂存器35及一第二暂存器37。只读记忆体40储存有一系统管理中断程式。上述仅为本发明的一实施例,第一暂存器35与第二暂存器37非仅能设于系统晶片30。Please refer to FIG. 2 , which is a block diagram of a preferred embodiment of the present invention. As shown in the figure, the embodiment of the present invention includes a
中央处理单元10进入无法窥视(noon-snoopZ)事件的C3状态时,为了让系统晶片30无法传输周边装置31所发送的处理事件至该中央处理单元10,所以中央处理单元10在进入无法窥视事件的C3状态之前,系统晶片30会关闭仲裁器33,使得中央处理单元10在进入C3状态后周边装置31发送的处理事件无法通过系统晶片30的仲裁器33传送至中央处理单元10,让中央处理单元10无法窥视处理事件而处于完全休眠状态。When the
接下来请配合参阅图3所示,说明本发明在中央处理单元10进入无法窥视事件的C3状态后,系统晶片30接收周边装置31所发送的汇流排主控器要求事件时的处理方法。中央处理单元10现如步骤S0所示是处于C3状态,且仲裁器33如同前述说明已为关闭状态。此时,若系统晶片30如步骤S1所示,接收周边装置31所发送的汇流排主控器要求事件时,系统晶片30即执行步骤S2,发送一第一控制讯息及一系统管理中断(SystemManagement Interrupt,SMI)讯息至中央处理单元10且写入一第一设定值至第一暂存器35,以记录有汇流排主控器要求事件。Next, please refer to FIG. 3 to illustrate the processing method of the present invention when the
中央处理单元10接收第一控制讯息时将离开C3状态进入至可执行指令的C0状态,且依据所接收的系统管理中断讯息进入一系统管理模式(System Management Mode,SMM)。本发明的系统晶片30发送系统管理中断讯息至中央处理单元10的原因在于,当中央处理单元10离开C3状态随即进入C0状态后,会受控于计算机系统的作业系统,就因如此中央处理单元10无法在处理完汇流排主控器要求事件后随即返回C3状态。所以本发明的系统晶片30在发送第一控制讯息时亦发送系统管理中断讯息,驱使中央处理单元10进入系统管理模式让中央处理单元10脱离作业系统控管。When the
因为驱使系统晶片30发送系统管理中断讯息至中央处理单元10的触发事件甚多,所以每一触发事件在驱使系统晶片30发送系统管理中断讯息至中央处理单元10时会写入设定值在相对的暂存器,以供中央处理单元10在进入系统管理模式后,侦测所有暂存器以依据设定值执行储存于只读记忆体40的系统管理中断程式。由此可知,中央处理单元10进入系统管理模式后需要花费时间侦测所有触发事件对应的暂存器。本发明即藉由此侦测时间开启仲裁器33,以传输汇流排主控器事件至中央处理单元10进行处理。本发明的中央处理单元10侦测到第一设定值时即得知有汇流排主控器要求事件,故不执行系统管理中断程式,直到处理完汇流排主控器要求事件并清除第一设定值为止。Because there are many trigger events that drive the
由前述可知,中央处理单元10离开C3状态进入C0状态及系统管理模式时,系统晶片30将执行步骤S3,开启仲裁器33,以让周边装置31发送的汇流排主控器要求事件传输至中央处理单元10进行处理,且侦测第一设定值。当中央处理单元10完成处理汇流排主控器要求事件后,系统晶片30即执行步骤S4,关闭仲裁器33并清除第一暂存器35的第一设定值。此时,中央处理单元10即会侦测到第一设定值被清除,表示已处理完汇流排主控器要求事件。As can be seen from the foregoing, when the
接着,中央处理单元10如步骤S5所示,执行系统管理中断程式,本发明的系统管理中断程式是驱使中央处理单元10返回C3状态。当中央处理单元10执行本发明的系统管理中断程式时,中央处理单元10会驱使系统晶片30发送一第二控制讯息至中央处理单元10,让中央处理单元10回复进入C3状态。中央处理单元10执行中断服务程式时,先会读取只读记忆体40的中断服务程式至一系统管理随机存取记忆体(System ManagementRAM,SMRAM),进而执行中断服务程式。系统管理随机存取记忆体为系统记忆体37的特定储存范围。Next, the
由前述可知,本发明是藉由驱使中央处理单元10进入系统管理模式脱离作业系统控管,如此即不会如同现有习用技术般因受作业系统控管而在中央处理单元10完成处理汇流排主控器事件后无法马上回复至C3状态,故本发明可较现有技术更为省电。As can be seen from the foregoing, the present invention breaks away from the control of the operating system by driving the
中央处理单元10执行完步骤S5之后,若周边装置31又发送一处理事件时,系统晶片30则执行步骤S6,判断处理事件是否为一中断事件。若该处理事件不是中断事件而为汇流排主控器要求事件时系统晶片30则执行步骤S7,发送第一控制讯息至中央处理单元10以驱使中央处理单元10离开C3状态,并写入第一设定值至第一暂存器35,并返回步骤S3的流程以重复执行上述步骤S3~S5。After the
若该处理事件为中断事件时中央处理单元10即必须离开系统管理模式,而回复至作业系统控管模式以处理中断事件。此时,本发明藉由系统晶片30执行步骤S8,写入一第二设定值至第二暂存器37;之后,中央处理单元10会如步骤S9所示,侦测第二暂存器37所存的第二设定值并如步骤S10所示,依据第二设定值离开系统管理模式而回复至作业系统控管模式,并且同时清除第二暂存器37的第二设定值。此外,系统晶片30会发送第一控制讯息至中央处理单元10,以驱使中央处理单元10离开C3状态而回复至正常可执行指令的C0状态。此时中央处理单元10因回复至作业系统控管模式,作业系统会驱使系统晶片30开启仲裁器33,以传输中断事件至中央处理单元10以进行处理。If the processing event is an interrupt event, the
当该处理事件为中断事件而中央处理单元10必须离开系统管理模式时,本发明亦可藉由系统晶片30直接驱使中央处理单元10离开系统管理模式,且发送第一控制讯息至中央处理单元10,以驱使中央处理单元10离开C3状态而回复至C0状态,而不须执行步骤S8~S10。When the processing event is an interrupt event and the
综上所述,本发明中央处理单元的节省电源方法及系统,主要应用在中央处理单元进入无法窥视事件的C3状态后若周边装置发出汇流排主控器要求事件时,本发明让中央处理单元离开C3状态进入可执行指令的处理状态以处理汇流排主控器要求事件,且进入系统管理模式以脱离作业系统控管。所以中央处理单元在完成处理汇流排主控器要求事件后,即可藉由中央处理单元在系统管理模式执行系统管理中断程式,驱使中央处理单元立即返回进入C3状态。如此即可减少中央处理单元损耗电能,进而达成节能的目的,以增加携带式计算机的电池的续航时间,本发明亦可节省桌上型计算机的用电量进而完善达到计算机节能的目的。To sum up, the power saving method and system of the central processing unit of the present invention are mainly used when the central processing unit enters the C3 state where events cannot be peeped. If the peripheral device sends a bus master request event, the present invention allows the central processing unit Leave the C3 state to enter the processing state of executable instructions to process the bus master request event, and enter the system management mode to escape from the control of the operating system. Therefore, after the central processing unit finishes processing the request event of the bus master, the central processing unit can execute the system management interrupt program in the system management mode to drive the central processing unit to return to the C3 state immediately. In this way, the power consumption of the central processing unit can be reduced, thereby achieving the purpose of energy saving, so as to increase the battery life of the portable computer.
以上所述,仅是本发明的较佳实施例而已,并非对本发明作任何形式上的限制,虽然本发明已以较佳实施例揭露如上,然而并非用以限定本发明,任何熟悉本专业的技术人员,在不脱离本发明技术方案范围内,当可利用上述揭示的技术内容作出些许更动或修饰为等同变化的等效实施例,但凡是未脱离本发明技术方案内容,依据本发明的技术实质对以上实施例所作的任何简单修改、等同变化与修饰,均仍属于本发明技术方案的范围内。The above description is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Anyone familiar with this field Those skilled in the art, without departing from the scope of the technical solution of the present invention, may use the technical content disclosed above to make some changes or modify them into equivalent embodiments with equivalent changes, but as long as they do not depart from the technical solution of the present invention, the Technical Essence Any simple modifications, equivalent changes and modifications made to the above embodiments still fall within the scope of the technical solution of the present invention.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2006100582934A CN100380282C (en) | 2006-03-02 | 2006-03-02 | Power saving method and system for CPU |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2006100582934A CN100380282C (en) | 2006-03-02 | 2006-03-02 | Power saving method and system for CPU |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1818830A CN1818830A (en) | 2006-08-16 |
| CN100380282C true CN100380282C (en) | 2008-04-09 |
Family
ID=36918873
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2006100582934A Active CN100380282C (en) | 2006-03-02 | 2006-03-02 | Power saving method and system for CPU |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100380282C (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100435071C (en) * | 2006-09-19 | 2008-11-19 | 威盛电子股份有限公司 | Power saving method and system for central processing unit |
| CN101881994A (en) * | 2009-05-06 | 2010-11-10 | 鸿富锦精密工业(深圳)有限公司 | Energy saving control system and control method |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5740454A (en) * | 1995-12-20 | 1998-04-14 | Compaq Computer Corporation | Circuit for setting computer system bus signals to predetermined states in low power mode |
| WO1998044405A1 (en) * | 1997-03-31 | 1998-10-08 | Intel Corporation | Automatic transitioning between acpi c3 and c2 states |
| JP2000039937A (en) * | 1998-07-22 | 2000-02-08 | Toshiba Corp | Computer system and power save control method thereof |
| CN1419666A (en) * | 2000-03-24 | 2003-05-21 | 英特尔公司 | Method and apparatus for implementing ACPI (Advanced Configuration and Power Interface) C3 state in RDRAM-based systems |
| CN1540539A (en) * | 2003-10-28 | 2004-10-27 | 威盛电子股份有限公司 | Interrupt signal control system and control method |
-
2006
- 2006-03-02 CN CNB2006100582934A patent/CN100380282C/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5740454A (en) * | 1995-12-20 | 1998-04-14 | Compaq Computer Corporation | Circuit for setting computer system bus signals to predetermined states in low power mode |
| WO1998044405A1 (en) * | 1997-03-31 | 1998-10-08 | Intel Corporation | Automatic transitioning between acpi c3 and c2 states |
| JP2000039937A (en) * | 1998-07-22 | 2000-02-08 | Toshiba Corp | Computer system and power save control method thereof |
| CN1419666A (en) * | 2000-03-24 | 2003-05-21 | 英特尔公司 | Method and apparatus for implementing ACPI (Advanced Configuration and Power Interface) C3 state in RDRAM-based systems |
| CN1540539A (en) * | 2003-10-28 | 2004-10-27 | 威盛电子股份有限公司 | Interrupt signal control system and control method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1818830A (en) | 2006-08-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI464571B (en) | A power saving electronic device for a computer motherboard in a standby dormant state and a computer motherboard | |
| KR102082241B1 (en) | Power efficient processor architecture | |
| TWI400604B (en) | Platform power management based on latency guidance | |
| US8504850B2 (en) | Method and controller for power management | |
| US20140082242A1 (en) | Reducing latency in a peripheral component interconnect express link | |
| CN101517510A (en) | Transitioning a computing platform to a low power system state | |
| US8499174B2 (en) | Method and controller for power management | |
| US20100332870A1 (en) | Electronic device for reducing power consumption of computer motherboard and motherboard thereof | |
| CN103443739A (en) | Methods, systems, and computer readable media for advanced power management for serial advanced technology attachment (SATA)-based storage devices | |
| CN103959234A (en) | Fast platform hibernation and recovery for computing systems | |
| US7774629B2 (en) | Method for power management of central processing unit and system thereof | |
| US20250231606A1 (en) | On-demand ip initialization within power states | |
| CN101145036A (en) | Power management structure and management mechanism | |
| CN104412669A (en) | Method for switching a device between hibernat mode and wake-up | |
| US7565558B2 (en) | Power saving method and system for a central processing unit disposed in a non-snooping sleep state when a peripheral device sends a bus master request | |
| CN100552600C (en) | north bridge power management device and method thereof | |
| CN100380282C (en) | Power saving method and system for CPU | |
| US11703937B2 (en) | Device and method for efficient transitioning to and from reduced power state | |
| CN100397302C (en) | Power saving method and system for central processing unit | |
| US7370215B2 (en) | Method and apparatus of self-powering down ATA devices | |
| US9207742B2 (en) | Power saving operating method for an electronic device by disabling a connection port to a touch device before the touch device enters power-saving mode | |
| CN105260146A (en) | Setting method and device capable of saving energy for disk | |
| CN100397301C (en) | Power saving method for central processing unit | |
| US7337338B2 (en) | Information handling system capable of operation in reduced power states | |
| US20090103404A1 (en) | Optic disk drive power management method for computer system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |