CN107015847A - Electronic device and working mode switching method thereof - Google Patents
Electronic device and working mode switching method thereof Download PDFInfo
- Publication number
- CN107015847A CN107015847A CN201610058755.6A CN201610058755A CN107015847A CN 107015847 A CN107015847 A CN 107015847A CN 201610058755 A CN201610058755 A CN 201610058755A CN 107015847 A CN107015847 A CN 107015847A
- Authority
- CN
- China
- Prior art keywords
- hardware core
- operating system
- volatile memory
- hardware
- core
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/461—Saving or restoring of program or task context
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
Description
技术领域technical field
本发明是有关于一种工作模式切换技术,且特别是有关于一种电子装置及其工作模式切换方法。The present invention relates to a working mode switching technology, and in particular to an electronic device and a working mode switching method thereof.
背景技术Background technique
一般来说,为了提高电子装置的运算速度,电子装置可能会安装有具有多个硬件核心的系统芯片。在具有多硬件核心的架构下,每一个硬件核心都会运行一个专属的作业系统,并且作业系统可以个别独立运作或彼此协调运作。一般来说,主(Master)硬件核心的运算能力会高于从(Slave)硬件核心的运算能力,因此,主硬件核心往往用以运行主要的作业系统,而从硬件核心则用以运行次要的作业系统。例如,主要的作业系统负责维持电子装置或系统芯片的整体运作,而次要的作业系统则着重在强化系统芯片的特定功能(例如,图形绘制或特定的硬件驱动)。Generally speaking, in order to increase the computing speed of the electronic device, the electronic device may be installed with a SoC having multiple hardware cores. Under the architecture with multiple hardware cores, each hardware core will run a dedicated operating system, and the operating systems can operate independently or coordinate with each other. Generally speaking, the computing power of the main (Master) hardware core will be higher than that of the slave (Slave) hardware core. Therefore, the main hardware core is often used to run the main operating system, while the slave hardware core is used to run the secondary hardware core. operating system. For example, the main operating system is responsible for maintaining the overall operation of the electronic device or the system chip, while the secondary operating system focuses on enhancing specific functions of the system chip (eg, graphics rendering or specific hardware drivers).
在现行的异构多硬件核心架构下,每一次电子装置被唤醒时,从硬件核心都需要重新被加载到易失性存储器中并需要重头进行初始化程序。特别是,随着系统芯片的设计日益复杂,从硬件核心的初始化程序日益庞大,势必会严重拖累将电子装置唤醒的速度。Under the current heterogeneous multi-hardware core architecture, every time the electronic device is woken up, the slave hardware core needs to be reloaded into the volatile memory and the initialization procedure needs to be performed again. In particular, as the design of the SoC becomes increasingly complex, the initialization program from the hardware core becomes increasingly large, which will inevitably seriously slow down the speed of waking up the electronic device.
发明内容Contents of the invention
有鉴于此,本发明提供一种电子装置及其工作模式切换方法,可有效提高多硬件核心电子装置的唤醒效率。In view of this, the present invention provides an electronic device and a working mode switching method thereof, which can effectively improve the wake-up efficiency of a multi-hardware core electronic device.
本发明的一实施例提供一种工作模式切换方法,其适用于具有易失性存储器与多个硬件核心的电子装置,所述方法包括:在所述硬件核心中的第一硬件核心运行第一作业系统,并且在所述硬件核心中的第二硬件核心运行第二作业系统;在正常工作模式下,所述第一硬件核心侦测指示进入待机模式的待机信号;所述第一硬件核心发送中断信号并且将对应于所述第一作业系统的第一运行状态的第一回复数据保存于所述易失性存储器,以回应所述待机信号;所述第二硬件核心储存所述第二作业系统的第二运行状态的第二回复数据于所述易失性存储器,以回应所述中断信号;以及进入所述待机模式并且在所述待机模式下暂停供电至所述第一硬件核心与所述第二硬件核心。An embodiment of the present invention provides a working mode switching method, which is suitable for an electronic device with a volatile memory and multiple hardware cores. The method includes: the first hardware core among the hardware cores runs the first operating system, and the second hardware core in the hardware core runs the second operating system; in the normal working mode, the first hardware core detects a standby signal indicating to enter the standby mode; the first hardware core sends interrupting a signal and storing first response data corresponding to a first operating state of the first operating system in the volatile memory in response to the standby signal; the second hardware core storing the second operation second reply data of a second operating state of the system in the volatile memory in response to the interrupt signal; and entering the standby mode and suspending power supply to the first hardware core and all the hardware cores in the standby mode Describe the second hardware core.
本发明的另一实施例提供一种电子装置,其包括易失性存储器、第一硬件核心、第二硬件核心及电源管理单元。所述第一硬件核心用以运行第一作业系统并耦接所述易失性存储器。所述第二硬件核心用以运行第二作业系统并耦接所述易失性存储器与所述第一硬件核心。所述电源管理单元耦接至所述易失性存储器、所述第一硬件核心及所述第二硬件核心。其中,在正常工作模式下,所述第一硬件核心侦测指示进入待机模式的待机信号。其中,所述第一硬件核心发送中断信号至第二硬件核心,并且将对应于所述第一作业系统的第一运行状态的第一回复数据保存于所述易失性存储器,以回应所述待机信号。其中,所述第二硬件核心收到中断信号后,将对应于所述第二作业系统的第二运行状态的第二回复数据保存于所述易失性存储器,以回应所述中断信号。其中,在进入所述待机模式之后,所述电源管理单元暂停供电至所述第一硬件核心与所述第二硬件核心,至此只有低功耗的电源管理单元处于低功耗侦听工作状态,而易失性存储器亦处于低功耗状态。Another embodiment of the present invention provides an electronic device, which includes a volatile memory, a first hardware core, a second hardware core, and a power management unit. The first hardware core is used to run a first operating system and is coupled to the volatile memory. The second hardware core is used to run a second operating system and is coupled to the volatile memory and the first hardware core. The power management unit is coupled to the volatile memory, the first hardware core and the second hardware core. Wherein, in the normal working mode, the first hardware core detects a standby signal indicating to enter the standby mode. Wherein, the first hardware core sends an interrupt signal to the second hardware core, and saves the first reply data corresponding to the first operating state of the first operating system in the volatile memory, in response to the Standby signal. Wherein, after receiving the interrupt signal, the second hardware core stores the second response data corresponding to the second operating state of the second operating system in the volatile memory, in response to the interrupt signal. Wherein, after entering the standby mode, the power management unit suspends power supply to the first hardware core and the second hardware core, so far only the power management unit with low power consumption is in the low power consumption listening working state, The volatile memory is also in a low power consumption state.
基于上述,电源管理单元在侦测到待机信号之后,首先会先启动第一硬件核心与第二硬件核心的电源,电子装置的第一硬件核心会将对应于其作业系统的第一运行状态的第一回复数据恢复于易失性存储器中并重置第二硬件核心。而电子装置的第二硬件核心会储存对应于其作业系统的第二运行状态的第二回复数据于易失性存储器,以回应所述中断信号。在进入待机模式之后,所述第一硬件核心与所述第二硬件核心会被暂停供电。藉此,储存于易失性存储器中的数据可供后续将电子装置唤醒时使用。在第一硬件核心被恢复供电后。第二硬件核心会判断是否从待机模式恢复回来,如果判断发现是,第二硬件核心只需要恢复之前保存在易失性存储器中的状态数据即可完成启动,进而有效提高异构多硬件核心电子装置地唤醒效率。Based on the above, after the power management unit detects the standby signal, it will first start the power supply of the first hardware core and the second hardware core, and the first hardware core of the electronic device will use the power corresponding to the first running state of its operating system. The first recovery data is restored in the volatile memory and resets the second hardware core. And the second hardware core of the electronic device stores the second response data corresponding to the second operating state of the operating system in the volatile memory to respond to the interrupt signal. After entering the standby mode, the first hardware core and the second hardware core will be suspended from power supply. In this way, the data stored in the volatile memory can be used when the electronic device is woken up later. After the first hardware core is powered back on. The second hardware core will judge whether to recover from the standby mode. If the judgment is found to be yes, the second hardware core only needs to restore the state data previously stored in the volatile memory to complete the startup, thereby effectively improving the heterogeneous multi-hardware core electronics. Device wake-up efficiency.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合所附图式作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail together with the accompanying drawings.
附图说明Description of drawings
图1是根据本发明的一实施例所绘示的电子装置的示意图。FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention.
图2是根据本发明的一实施例所绘示的工作模式切换方法的流程图。FIG. 2 is a flowchart of a working mode switching method according to an embodiment of the present invention.
图3是根据本发明的另一实施例所绘示的工作模式切换方法的流程图。FIG. 3 is a flowchart of a working mode switching method according to another embodiment of the present invention.
附图标记说明Explanation of reference signs
10:电子装置10: Electronic device
11、12:硬件核心11, 12: Hardware core
13:易失性存储器13: Volatile memory
14:电源管理单元14: Power management unit
S201~S206、S301~S305:步骤S201~S206, S301~S305: steps
具体实施方式detailed description
图1是根据本发明的一实施例所绘示的电子装置的示意图。在下文中,所提及的耦接一词包括直接或间接的电性连接。FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. Hereinafter, the term coupled includes direct or indirect electrical connection.
请参照图1,电子装置10至少包括硬件核心11、硬件核心12、易失性存储器13及电源管理单元14。硬件核心11耦接至硬件核心12。硬件核心11及硬件核心12分别包含至少一个处理器。Referring to FIG. 1 , the electronic device 10 at least includes a hardware core 11 , a hardware core 12 , a volatile memory 13 and a power management unit 14 . The hardware core 11 is coupled to the hardware core 12 . The hardware core 11 and the hardware core 12 respectively include at least one processor.
在本实施例中,硬件核心11与硬件核心12的硬件架构不同。硬件核心11为电子装置10的主要硬件核心,而硬件核心12为电子装置10的次要硬件核心。例如,硬件核心11的硬件运算能力高于硬件核心12的硬件运算能力。或者,在另一实施例中,硬件核心11与硬件核心12亦可以是具有相同或相似的硬件架构并且可具有相同的硬件运算能力。此外,硬件核心11与硬件核心12可以个别独立运作或者可协调运作。In this embodiment, the hardware architectures of the hardware core 11 and the hardware core 12 are different. The hardware core 11 is the main hardware core of the electronic device 10 , and the hardware core 12 is the secondary hardware core of the electronic device 10 . For example, the hardware computing capability of the hardware core 11 is higher than that of the hardware core 12 . Alternatively, in another embodiment, the hardware core 11 and the hardware core 12 may also have the same or similar hardware architecture and may have the same hardware computing capability. In addition, the hardware core 11 and the hardware core 12 can operate independently or coordinately.
易失性存储器13耦接至硬件核心11及硬件核心12并且用以暂存数据。例如,易失性存储器13可以包含各种类型的随机存取记忆体(Random Access Memory,RAM)。在本实施例中,易失性存储器13是独立于硬件核心11与硬件核心12之外。然而,在另一实施例中,易失性存储器13亦可以配置于硬件核心11及/或硬件核心12内。此外,在一实施例中,易失性存储器13亦可以结合非易失性存储器(例如,快闪记忆体等)一起使用。The volatile memory 13 is coupled to the hardware core 11 and the hardware core 12 and used for temporarily storing data. For example, the volatile memory 13 may include various types of random access memory (Random Access Memory, RAM). In this embodiment, the volatile memory 13 is independent from the hardware core 11 and the hardware core 12 . However, in another embodiment, the volatile memory 13 can also be configured in the hardware core 11 and/or the hardware core 12 . In addition, in an embodiment, the volatile memory 13 can also be used in combination with a non-volatile memory (eg, flash memory, etc.).
电源管理单元14耦接至硬件核心11、硬件核心12及易失性存储器13。电源管理单元14用以管理供应至硬件核心11、硬件核心12及易失性存储器13的电源。例如,电源管理单元14可控制电子装置11的电池模块(未绘示)。其中,电池模块可包括电池等电源供应器。在本实施例中,电源管理单元14是独立于硬件核心11与硬件核心12之外。然而,本发明并不以此为限,在其他应用中,电源管理单元14亦可包含于硬件核心11内。The power management unit 14 is coupled to the hardware core 11 , the hardware core 12 and the volatile memory 13 . The power management unit 14 is used to manage power supplied to the hardware core 11 , the hardware core 12 and the volatile memory 13 . For example, the power management unit 14 can control the battery module (not shown) of the electronic device 11 . Wherein, the battery module may include a power supply such as a battery. In this embodiment, the power management unit 14 is independent from the hardware core 11 and the hardware core 12 . However, the present invention is not limited thereto, and in other applications, the power management unit 14 can also be included in the hardware core 11 .
在本实施例中,硬件核心11与硬件核心12属于异构多核(Heterogeneous Multi-Core)架构下的单芯片多处理器(Chip Multi-Processor,CMP)。例如,此单芯片多处理器可以与易失性存储器13及电源管理单元14配置于同一处理芯片或电路板。或者,易失性存储器13及/或电源管理单元14也可以包含在此单芯片多处理器内。在本实施例中,电子装置10可以是指此单芯片多处理器或者包含此单芯片多处理器的处理芯片。在另一实施例中,电子装置10亦可以是行动装置、平板电脑、笔记型电脑、桌上型电脑、数位机上盒、多媒体播放器或智能电视等各式包含此单芯片多处理器的电子装置,且其类型不限于上述。In this embodiment, the hardware core 11 and the hardware core 12 belong to a single-chip multi-processor (Chip Multi-Processor, CMP) under a heterogeneous multi-core (Heterogeneous Multi-Core) architecture. For example, the single-chip multiprocessor can be configured on the same processing chip or circuit board as the volatile memory 13 and the power management unit 14 . Alternatively, the volatile memory 13 and/or the power management unit 14 may also be included in the single-chip multi-processor. In this embodiment, the electronic device 10 may refer to the single-chip multi-processor or a processing chip including the single-chip multi-processor. In another embodiment, the electronic device 10 can also be a mobile device, a tablet computer, a notebook computer, a desktop computer, a digital set-top box, a multimedia player or a smart TV, etc. device, and its type is not limited to the above.
在本实施例中,硬件核心11运行有至少一个作业系统(以下亦称为第一作业系统),而硬件核心12则运行有另外的至少一个作业系统(以下亦称为第二作业系统)。其中,第一作业系统与第二作业系统不同。为了说明方便,在此是以硬件核心11及硬件核心12个别运行一个专属的作业系统为例。例如,硬件核心11所运行的第一作业系统为Linux作业系统,而硬件核心12所运行的第二作业系统则为实时操作系统(Real-TimeOperating system,RTOS)。然而,在另一实施例中,硬件核心11及硬件核心12的数目可以是更多并且可用以运行更多的作业系统。此外,在另一实施例中,第一作业系统与第二作业系统也可以是其他类型的作业系统,例如,微软视窗(Windows)或iOS作业系统等等。In this embodiment, the hardware core 11 runs at least one operating system (hereinafter also referred to as the first operating system), and the hardware core 12 runs at least one other operating system (hereinafter also referred to as the second operating system). Wherein, the first operating system is different from the second operating system. For the convenience of description, here it is taken as an example that the hardware core 11 and the hardware core 12 each run a dedicated operating system. For example, the first operating system run by the hardware core 11 is a Linux operating system, and the second operating system run by the hardware core 12 is a real-time operating system (Real-Time Operating system, RTOS). However, in another embodiment, the number of the hardware cores 11 and the hardware cores 12 may be greater and may be used to run more operating systems. In addition, in another embodiment, the first operating system and the second operating system may also be other types of operating systems, such as Microsoft Windows (Windows) or iOS operating systems, and so on.
在操作中,电子装置10在开机后可以运作在正常工作模式或待机模式。在本实施例中,待机模式可以是指省电、睡眠、休眠等耗电量较低的工作模式,而正常工作模式则是相对于上述工作模式之外耗电量较高的工作模式。以高级配置与电源介面(Advanced Configuration and Power Interface)为例,待机模式可以是指S1至S3模式中的任一者,而正常工作模式则是指S0模式。例如,在正常工作模式下,硬件核心11、硬件核心12以及电子装置10中的大部分电子元件都可以正常运作且被正常供电;而在待机模式下,可能只有易失性存储器13与电源管理单元14被正常供电或以最低工作电压供电。In operation, the electronic device 10 can operate in a normal working mode or a standby mode after being turned on. In this embodiment, the standby mode may refer to working modes with low power consumption such as power saving, sleep, and hibernation, and the normal working mode is a working mode with higher power consumption than the above-mentioned working modes. Taking the Advanced Configuration and Power Interface as an example, the standby mode can refer to any one of the S1 to S3 modes, and the normal working mode refers to the S0 mode. For example, in the normal working mode, most of the electronic components in the hardware core 11, the hardware core 12 and the electronic device 10 can operate normally and be powered normally; while in the standby mode, only the volatile memory 13 and power management Unit 14 is powered normally or at the lowest operating voltage.
在本实施例中,电子装置10开机后会先处于正常工作模式。在正常工作模式下,硬件核心11会侦测用于指示进入待机模式的待机信号。例如,在电子装置10闲置超过一预设时间(例如,5分钟)或者接收到用户对于电子装置10上的电源按钮的触发操作之后,电子装置10的基本输入/输出系统(Basic Input/Output System,BIOS)会输出此待机信号。在侦测到此待机信号之后,硬件核心11会发送一中断信号至硬件核心12并且将一第一回复数据保存于易失性存储器13中,以回应此待机信号。其中,第一回复数据系对应于硬件核心11所运行的作业系统(即,第一作业系统)的当前运行状态(以下亦称为第一运行状态)。在接收到此中断信号之后,硬件核心12会将一第二回复数据保存于易失性存储器13中,以回应此中断信号。其中,第二回复数据系对应于硬件核心12所运行的作业系统(即,第二作业系统)的当前运行状态(以下亦称为第二运行状态)。在将第一回复数据与第二回复数据储存至易失性存储器13之后,电子装置10会进入待机模式。因此,电源管理单元14会暂停供电至硬件核心11与硬件核心12。In this embodiment, the electronic device 10 is in the normal working mode first after being turned on. In the normal working mode, the hardware core 11 detects a standby signal indicating to enter the standby mode. For example, after the electronic device 10 is idle for more than a preset time (for example, 5 minutes) or after receiving a trigger operation of the power button on the electronic device 10 by the user, the Basic Input/Output System (BIS) of the electronic device 10 ,BIOS) will output this standby signal. After detecting the standby signal, the hardware core 11 sends an interrupt signal to the hardware core 12 and stores a first response data in the volatile memory 13 in response to the standby signal. Wherein, the first reply data corresponds to the current running state (hereinafter referred to as the first running state) of the operating system (ie, the first operating system) run by the hardware core 11 . After receiving the interrupt signal, the hardware core 12 will store a second response data in the volatile memory 13 in response to the interrupt signal. Wherein, the second reply data corresponds to the current running state (hereinafter referred to as the second running state) of the operating system (ie, the second operating system) run by the hardware core 12 . After the first reply data and the second reply data are stored in the volatile memory 13, the electronic device 10 enters the standby mode. Therefore, the power management unit 14 suspends power supply to the hardware core 11 and the hardware core 12 .
值得一提的是,第一回复数据是用以让硬件核心11快速回复其作业系统(即,第一作业系统)至进入待机模式前的运行状态(即,第一运行状态),而第二回复数据则是用以让硬件核心12快速回复其作业系统(即,第二作业系统)至进入待机模式前的运行状态(即,第二运行状态)。因此,在待机模式下,电源管理单元14会持续供电至易失性存储器13以保存第一回复数据与第二回复数据。It is worth mentioning that the first reply data is used to allow the hardware core 11 to quickly restore its operating system (i.e., the first operating system) to the operating state before entering the standby mode (i.e., the first operating state), and the second The recovery data is used to allow the hardware core 12 to quickly restore its operating system (ie, the second operating system) to the running state before entering the standby mode (ie, the second running state). Therefore, in the standby mode, the power management unit 14 will continue to supply power to the volatile memory 13 to save the first reply data and the second reply data.
在待机模式下,电源管理单元14会侦测用以将电子装置10从待机模式中唤醒的一唤醒信号。例如,当电子装置10的BIOS侦测到来自一预设的输入装置(例如,触控萤幕、滑鼠、键盘、触控板或电源开关)的输入信号时,电子装置10的BIOS会输出此唤醒信号。在侦测到此唤醒信号之后,电源管理单元14会恢复供电至硬件核心11与硬件核心12,以回应此唤醒信号。在硬件核心11被恢复供电后,硬件核心11会发送一重置信号至硬件核心12并且从易失性存储器13中读取第一回复数据,以回应此唤醒信号。在获得第一回复数据之后,硬件核心11会根据此第一回复数据回复其作业系统(即,第一作业系统)至进入待机模式前的运行状态(即,第一运行状态)。另外,在硬件核心12被恢复供电后,硬件核心12接收此重置信号并且从易失性存储器13中读取第二回复数据,以回应此重置信号。在获得第二回复数据之后,硬件核心12会根据此第二回复数据回复其作业系统(即,第二作业系统)至进入待机模式前的运行状态(即,第二运行状态)。例如,所回复的作业系统的运行状态可包括作业系统在进入待机模式之前所开启的系统程序及/或应用程序、所开启的系统程序及/或应用程序的执行状态等等。In the standby mode, the power management unit 14 detects a wake-up signal for waking up the electronic device 10 from the standby mode. For example, when the BIOS of the electronic device 10 detects an input signal from a preset input device (for example, a touch screen, a mouse, a keyboard, a touchpad or a power switch), the BIOS of the electronic device 10 will output this wake up signal. After detecting the wake-up signal, the power management unit 14 restores power to the hardware core 11 and the hardware core 12 in response to the wake-up signal. After the hardware core 11 is powered back on, the hardware core 11 sends a reset signal to the hardware core 12 and reads the first response data from the volatile memory 13 in response to the wake-up signal. After obtaining the first reply data, the hardware core 11 restores its operating system (ie, the first operating system) to the running state before entering the standby mode (ie, the first running state) according to the first reply data. In addition, after the hardware core 12 is powered back on, the hardware core 12 receives the reset signal and reads the second reply data from the volatile memory 13 in response to the reset signal. After obtaining the second reply data, the hardware core 12 restores its operating system (ie, the second operating system) to the running state before entering the standby mode (ie, the second running state) according to the second reply data. For example, the returned operating status of the operating system may include system programs and/or application programs opened before the operating system enters the standby mode, execution status of the opened system programs and/or application programs, and the like.
在一实施例中,在接收到重置信号之后,硬件核心12还可以进一步判断第二回复数据是否保存于易失性存储器13中。若第二回复数据保存于易失性存储器13中,则硬件核心12会根据第二回复数据来回复上述第二作业系统的第二运行状态。反之,若硬件核心12判定所需的第二回复数据并未保存于易失性存储器13中,则硬件核心12会执行第二作业系统的初始化程序。在第二作业系统的初始化程序中,第二作业系统会被回复到初始化状态。例如,初始化状态会等同于电子装置10开机后第二作业系统的预设状态。特别是,硬件核心12执行此初始化程序的总耗费时间会多于硬件核心12根据第二回复数据回复第二作业系统至第二运行状态的总耗费时间。In an embodiment, after receiving the reset signal, the hardware core 12 may further determine whether the second reply data is stored in the volatile memory 13 . If the second reply data is stored in the volatile memory 13, the hardware core 12 will restore the second running state of the second operating system according to the second reply data. On the contrary, if the hardware core 12 determines that the required second recovery data is not stored in the volatile memory 13, the hardware core 12 will execute the initialization program of the second operating system. In the initialization procedure of the second operating system, the second operating system will be returned to the initialization state. For example, the initialization state is equal to the default state of the second operating system after the electronic device 10 is turned on. In particular, the total time spent on executing the initialization program by the hardware core 12 is greater than the total time spent on the hardware core 12 restoring the second operating system to the second running state according to the second reply data.
换言之,在一实施例中,若在将电子装置10从正常工作模式切换到待机模式的程序中,有确实地将上述第二回复数据储存于易失性存储器13中且妥善地保存,则后续将电子装置10从待机模式切换回正常工作模式的程序中,硬件核心12就可以根据保存在易失性存储器13的第二回复数据快速地回复至先前的运行状态;反之,若在将电子装置10从正常工作模式切换到待机模式的程序中,没有确实地将上述第二回复数据储存于易失性存储器13中,或者在待机模式下,第二回复数据并未被妥善地保存(例如,在待机状态下电子装置10被突然的断电或关机而导致第二回复数据遗失),则后续将电子装置10从待机模式切换回正常工作模式的程序中,硬件核心12将无法从易失性存储器13中读回第二回复数据。在此状况下,硬件核心12会执行第二作业系统的初始化程序以将第二作业系统回复至初始化状态,从而保证电子装置10仍然可以正常的运作。In other words, in one embodiment, if in the process of switching the electronic device 10 from the normal working mode to the standby mode, the above-mentioned second reply data is definitely stored in the volatile memory 13 and properly preserved, then the subsequent In the program of switching the electronic device 10 back to the normal working mode from the standby mode, the hardware core 12 can quickly return to the previous operating state according to the second reply data stored in the volatile memory 13; 10 In the program of switching from the normal working mode to the standby mode, the above-mentioned second reply data is not stored in the volatile memory 13, or in the standby mode, the second reply data is not properly saved (for example, In the standby state, the electronic device 10 is suddenly powered off or shut down and the second reply data is lost), then in the subsequent program of switching the electronic device 10 from the standby mode to the normal working mode, the hardware core 12 will not be able to recover from the volatile The second reply data is read back from the memory 13 . In this situation, the hardware core 12 executes the initialization program of the second operating system to restore the second operating system to the initialization state, so as to ensure that the electronic device 10 can still operate normally.
在一实施例中,储存在易失性存储器13中的第一回复数据与第二回复数据分别具有一个数据标签。硬件核心11与硬件核心12可以分别在易失性存储器13搜寻相对应的数据标签来取得所需的第一回复数据与第二回复数据。In one embodiment, the first reply data and the second reply data stored in the volatile memory 13 respectively have a data tag. The hardware core 11 and the hardware core 12 can respectively search the corresponding data tags in the volatile memory 13 to obtain the required first reply data and the second reply data.
在一实施例中,若电子装置10具有更多的硬件核心,则在电子装置10进行待机模式之前,用来回复每一个硬件核心所运行的作业系统的运行状态的回复数据皆可以储存在易失性存储器13中。当电子装置10欲离开待机模式而进入正常工作模式时,此些硬件核心可分别利用保存在易失性存储器13中的回复数据以快速地回复先前的工作状态。In one embodiment, if the electronic device 10 has more hardware cores, before the electronic device 10 enters the standby mode, the reply data used to restore the operation status of the operating system run by each hardware core can be stored in the easy In the volatile memory 13. When the electronic device 10 intends to leave the standby mode and enter the normal working mode, these hardware cores can respectively use the recovery data stored in the volatile memory 13 to quickly restore the previous working state.
图2是根据本发明的一实施例所绘示的工作模式切换方法的流程图。FIG. 2 is a flowchart of a working mode switching method according to an embodiment of the present invention.
请参照图2,在步骤S201中,于电子装置的第一硬件核心运行第一作业系统,并且于电子装置的第二硬件核心运行第二作业系统。在步骤S202中,在正常工作模式下,侦测指示进入待机模式的待机信号。在步骤S203中,判断是否侦测到待机信号。若否,持续侦测待机信号。若侦测到待机信号,则在步骤S204中,由第一硬件核心发送中断信号并将对应于第一作业系统的第一运行状态的第一回复数据保存于易失性存储器中,以回应待机信号。在步骤S205中,由第二硬件核心将对应于第二作业系统的第二运行状态的第二回复数据保存于易失性存储器中,以回应中断信号。在步骤S206中,使电子装置进入待机模式,并且在待机模式下暂停供电至第一硬件核心与第二硬件核心。Referring to FIG. 2 , in step S201 , a first operating system is run on a first hardware core of the electronic device, and a second operating system is run on a second hardware core of the electronic device. In step S202, in the normal working mode, a standby signal indicating to enter the standby mode is detected. In step S203, it is determined whether a standby signal is detected. If not, continue to detect the standby signal. If the standby signal is detected, then in step S204, the first hardware core sends an interrupt signal and stores the first response data corresponding to the first operating state of the first operating system in the volatile memory to respond to the standby Signal. In step S205, the second hardware core stores the second response data corresponding to the second operating state of the second operating system in the volatile memory to respond to the interrupt signal. In step S206 , the electronic device is put into a standby mode, and power supply to the first hardware core and the second hardware core is suspended in the standby mode.
图3是根据本发明的另一实施例所绘示的工作模式切换方法的流程图。FIG. 3 is a flowchart of a working mode switching method according to another embodiment of the present invention.
请参照图3,在步骤S301中,在待机模式下,持续侦测唤醒信号。在步骤S302中,判断是否侦测到唤醒信号。若否,持续侦测唤醒信号。若侦测到唤醒信号,在步骤S303中,恢复供电至第一硬件核心与第二硬件核心。在步骤S304中,由第一硬件核心发送重置信号并且根据保存于易失性存储器的第一回复数据回复第一作业系统的第一运行状态,以回应此唤醒信号。在步骤S305中,由第二硬件核心根据保存于易失性存储器的第二回复数据回复第二作业系统的第二运行状态,以回应此重置信号。Please refer to FIG. 3 , in step S301 , in the standby mode, continuously detect the wake-up signal. In step S302, it is determined whether a wake-up signal is detected. If not, continuously detect the wake-up signal. If a wake-up signal is detected, in step S303, power supply to the first hardware core and the second hardware core is restored. In step S304, the first hardware core sends a reset signal and restores the first running state of the first operating system according to the first reply data stored in the volatile memory, in response to the wake-up signal. In step S305, the second hardware core restores the second running state of the second operating system according to the second reply data stored in the volatile memory, in response to the reset signal.
此外,在图3的另一实施例中,在侦测到重置信号之后,若第二硬件核心判定第二回复数据未被保存于预设的易失性存储器中,则第二硬件核心亦可直接执行第二作业系统的初始化程序。但是,须注意的是,相对于利用第二回复数据来回复第二作业系统先前的运行状态,第二硬件核心可能需要更多的时间来执行第二作业系统的初始化程序。In addition, in another embodiment of FIG. 3, after detecting the reset signal, if the second hardware core determines that the second reply data is not stored in the preset volatile memory, the second hardware core also The initialization program of the second operating system can be directly executed. However, it should be noted that compared with using the second recovery data to restore the previous operating state of the second operating system, the second hardware core may need more time to execute the initialization program of the second operating system.
然而,图2与图3中各步骤已详细说明如上,在此便不再赘述。值得注意的是,图2与图3中各步骤可以实作为多个程序码或是电路,本发明不加以限制。例如,在图1的一实施例中,。硬件核心11、硬件核心12及电源管理单元14可个别包含完成相应功能所需的功能模块。此外,图2与图3的方法可以搭配以上实施例使用,也可以单独使用,本发明不加以限制。However, each step in FIG. 2 and FIG. 3 has been described in detail above, and will not be repeated here. It should be noted that each step in FIG. 2 and FIG. 3 can be implemented as a plurality of program codes or circuits, which is not limited in the present invention. For example, in an embodiment of FIG. 1 , . The hardware core 11 , the hardware core 12 and the power management unit 14 may individually include functional modules required to complete corresponding functions. In addition, the methods shown in FIG. 2 and FIG. 3 can be used in combination with the above embodiments, or can be used alone, which is not limited by the present invention.
综上所述,在侦测到待机信号之后,与多个硬件核心个别运行的作业系统的运行状态有关的回复数据会被暂存在易失性存储器中。藉此,即便进入待机模式之后第一硬件核心与第二硬件核心被暂停供电,当欲将电子装置唤醒时,第一硬件核心与第二硬件核心可以根据易失性存储器中相对应的回复数据快速地回复至其进入待机模式前的工作状态。特别是,针对异构多核架构下的单芯片多处理器,本发明更可以有效减少将次要的硬件核心回复至正常工作状态所需的时间。To sum up, after the standby signal is detected, the reply data related to the running status of the operating systems individually run by the multiple hardware cores will be temporarily stored in the volatile memory. In this way, even if the first hardware core and the second hardware core are suspended from power supply after entering the standby mode, when the electronic device is to be woken up, the first hardware core and the second hardware core can respond according to the corresponding reply data in the volatile memory Quickly return to the working state before it entered standby mode. Especially, for the single-chip multi-processor under the heterogeneous multi-core architecture, the present invention can effectively reduce the time required for the secondary hardware core to return to the normal working state.
虽然本发明已以实施例揭露如上,然其并非用以限定本发明,任何所属技术领域中具有通常知识者,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,故本发明的保护范围当视后附的权利要求所界定者为准。Although the present invention has been disclosed as above with the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610058755.6A CN107015847A (en) | 2016-01-28 | 2016-01-28 | Electronic device and working mode switching method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610058755.6A CN107015847A (en) | 2016-01-28 | 2016-01-28 | Electronic device and working mode switching method thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107015847A true CN107015847A (en) | 2017-08-04 |
Family
ID=59439144
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610058755.6A Pending CN107015847A (en) | 2016-01-28 | 2016-01-28 | Electronic device and working mode switching method thereof |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107015847A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108040361A (en) * | 2017-12-06 | 2018-05-15 | 上海麦腾物联网技术有限公司 | A kind of method for managing power supply of cross-platform Internet of Things embedded system |
| CN114884308A (en) * | 2022-05-11 | 2022-08-09 | 江苏兆能电子有限公司 | Method for reducing standby power consumption of wide-input-range linear voltage stabilizing circuit |
| CN115576258A (en) * | 2022-12-08 | 2023-01-06 | 小米汽车科技有限公司 | Vehicle chip system control method, system-on-chip and vehicle |
| CN115756622A (en) * | 2022-12-01 | 2023-03-07 | 镁佳(北京)科技有限公司 | Chip control method and chip |
| CN118244689A (en) * | 2024-05-29 | 2024-06-25 | 小米汽车科技有限公司 | Chip system control method, system-level chip and vehicle |
| CN118860115A (en) * | 2024-07-31 | 2024-10-29 | 小米汽车科技有限公司 | Chip startup method, system-level chip and vehicle |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102521002A (en) * | 2010-12-22 | 2012-06-27 | 威盛电子股份有限公司 | Dynamically and selectively disabling cores and reconfiguring a multicore microprocessor |
| CN102708064A (en) * | 2011-02-24 | 2012-10-03 | 微软公司 | Multi-phase resume from hibernate |
| CN103677867A (en) * | 2012-09-05 | 2014-03-26 | 珠海扬智电子科技有限公司 | Electronic device rapidly recovering starting-up state, control unit and control method of electronic device |
| CN104020834A (en) * | 2013-02-28 | 2014-09-03 | 株式会社东芝 | Control device and control method |
| CN104412224A (en) * | 2012-05-30 | 2015-03-11 | 先进微装置公司 | Reinitalization of a processing system from volatile memory upon resuming from a low-power state |
| CN104778081A (en) * | 2014-01-14 | 2015-07-15 | 仁宝电脑工业股份有限公司 | Method for switching operating system and electronic device |
| CN105224454A (en) * | 2015-09-25 | 2016-01-06 | 华为技术有限公司 | A kind of adjustment method, polycaryon processor and commissioning device |
-
2016
- 2016-01-28 CN CN201610058755.6A patent/CN107015847A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102521002A (en) * | 2010-12-22 | 2012-06-27 | 威盛电子股份有限公司 | Dynamically and selectively disabling cores and reconfiguring a multicore microprocessor |
| CN102708064A (en) * | 2011-02-24 | 2012-10-03 | 微软公司 | Multi-phase resume from hibernate |
| CN104412224A (en) * | 2012-05-30 | 2015-03-11 | 先进微装置公司 | Reinitalization of a processing system from volatile memory upon resuming from a low-power state |
| CN103677867A (en) * | 2012-09-05 | 2014-03-26 | 珠海扬智电子科技有限公司 | Electronic device rapidly recovering starting-up state, control unit and control method of electronic device |
| CN104020834A (en) * | 2013-02-28 | 2014-09-03 | 株式会社东芝 | Control device and control method |
| CN104778081A (en) * | 2014-01-14 | 2015-07-15 | 仁宝电脑工业股份有限公司 | Method for switching operating system and electronic device |
| CN105224454A (en) * | 2015-09-25 | 2016-01-06 | 华为技术有限公司 | A kind of adjustment method, polycaryon processor and commissioning device |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108040361A (en) * | 2017-12-06 | 2018-05-15 | 上海麦腾物联网技术有限公司 | A kind of method for managing power supply of cross-platform Internet of Things embedded system |
| CN108040361B (en) * | 2017-12-06 | 2021-03-19 | 上海麦腾物联网技术有限公司 | A power management method for cross-platform IoT embedded system |
| CN114884308A (en) * | 2022-05-11 | 2022-08-09 | 江苏兆能电子有限公司 | Method for reducing standby power consumption of wide-input-range linear voltage stabilizing circuit |
| CN115756622A (en) * | 2022-12-01 | 2023-03-07 | 镁佳(北京)科技有限公司 | Chip control method and chip |
| CN115756622B (en) * | 2022-12-01 | 2024-04-09 | 镁佳(北京)科技有限公司 | Chip control method and chip |
| CN115576258A (en) * | 2022-12-08 | 2023-01-06 | 小米汽车科技有限公司 | Vehicle chip system control method, system-on-chip and vehicle |
| CN118244689A (en) * | 2024-05-29 | 2024-06-25 | 小米汽车科技有限公司 | Chip system control method, system-level chip and vehicle |
| CN118860115A (en) * | 2024-07-31 | 2024-10-29 | 小米汽车科技有限公司 | Chip startup method, system-level chip and vehicle |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109885343B (en) | Controller low-power-consumption starting method and device, computer equipment and storage medium | |
| TWI653558B (en) | Electronic system for accepting touch gesture in power saving mode to switch to normal mode, touch processing device and method thereof | |
| CN102135910B (en) | Method for switching operating systems and electronic device using the method | |
| US8028177B2 (en) | Method for changing power states of a computer | |
| CN107015847A (en) | Electronic device and working mode switching method thereof | |
| JP5885881B2 (en) | Implementing a power off state on a computing device | |
| CN103116402B (en) | Computer system with voice control function and voice control method | |
| CN102866934A (en) | Dormancy and wake-up system for embedded device based on non-volatile random access memory | |
| WO2010027375A1 (en) | Method and system for providing hybrid-shutdown and fast startup processes | |
| CN113703799B (en) | Computing device and BIOS updating method and medium thereof | |
| US9110723B2 (en) | Multi-core binary translation task processing | |
| CN103970560A (en) | Starting method and electronic device | |
| CN104182243B (en) | Sleep state control system, computer system and sleep state detection method thereof | |
| WO2019028854A1 (en) | Method and device for state management of virtual machine, and intelligent terminal | |
| TW201421223A (en) | Power control system and method thereof | |
| CN104460925A (en) | Power management implementation method based on ShenWei platform | |
| CN103376828B (en) | Notebook computer | |
| CN102736928A (en) | Quickly wake up computer system method and computer system | |
| CN101441449A (en) | Method for automatically switching power supply state | |
| CN102681650B (en) | The storage system of a kind of Energy control power-economizing method and correspondence thereof | |
| TWI667569B (en) | Computer wake-up method and computer power saving method | |
| CN101436097B (en) | Electronic device and wake-up method thereof | |
| CN101872233B (en) | Automatic switch machine scheduling control method and system | |
| US20150123875A1 (en) | Power management device and method | |
| US10007315B2 (en) | Electronic device and method of preventing electronic device from entering hibernation |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170804 |