JP2011008688A - Control method for built-in system - Google Patents

Control method for built-in system Download PDF

Info

Publication number
JP2011008688A
JP2011008688A JP2009153808A JP2009153808A JP2011008688A JP 2011008688 A JP2011008688 A JP 2011008688A JP 2009153808 A JP2009153808 A JP 2009153808A JP 2009153808 A JP2009153808 A JP 2009153808A JP 2011008688 A JP2011008688 A JP 2011008688A
Authority
JP
Japan
Prior art keywords
suspend
resume
embedded system
support
control method
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
Application number
JP2009153808A
Other languages
Japanese (ja)
Inventor
Fujihito Numano
藤仁 沼野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2009153808A priority Critical patent/JP2011008688A/en
Publication of JP2011008688A publication Critical patent/JP2011008688A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

PROBLEM TO BE SOLVED: To allow, in a built-in system including a device which cannot support a suspend-resume function, the suspend-resume of the system.SOLUTION: In the control method for a built-in system partially including a device which does not support the suspend-resume function, interruption is prohibited for the device from start of suspend processing to completion of resume processing, and when the resume processing is completed, the device is initialized prior to permission of the interruption.

Description

本発明は、組み込みシステムの制御方法に係り、特にシステム全体のサスペンドレジュームを可能にする制御方法に関する。   The present invention relates to a control method of an embedded system, and more particularly to a control method that enables suspend resume of the entire system.

情報処理装置などを始め、消費電力を抑えるためにレジューム機能を搭載する機器が増えている。中でもハイバネーションは不揮発記憶領域にサスペンドイメージを保存するために待機電流を必要としないので、省電力性能はもっとも優れている。サスペンドレジューム機能があれば、レジュームは、起動に比べ稼動状態に復帰するのが早いので、使用しない状態では省電力性能をもち、使用したいときはすぐに稼動状態になることができる。   An increasing number of devices, such as information processing devices, are equipped with a resume function to reduce power consumption. Among them, hibernation does not require a standby current to store a suspend image in a nonvolatile storage area, so that power saving performance is most excellent. If the suspend / resume function is provided, the resume can be returned to the operating state more quickly than the start-up, so that it has power saving performance when not in use and can immediately enter the operating state when it is desired to use it.

しかしながら、サスペンドレジューム機能に対応していないデバイスや、デバイスドライバのサスペンドレジューム処理に不備をもつデバイスを含む組み込みシステムでは、同機能をサポートすることができない。このような組み込みシステムでは、使用の都度、起動/終了処理を行うか、常に稼動状態にしておかなければならない。使用の都度、起動終了するのは、起動に時間がかかり使いたいときにすぐに使用できないという欠点がある。また、常にシステム稼動にしておくのは、省電力性能が劣るという問題がある。   However, an embedded system including a device that does not support the suspend / resume function or a device that has a deficiency in the suspend / resume process of the device driver cannot support the function. In such an embedded system, it is necessary to perform start / end processing each time it is used or to keep it in an operating state. The end of activation every time it is used has the disadvantage that it takes a long time for activation and cannot be used immediately when it is desired to use it. Moreover, there is a problem that the power saving performance is inferior when the system is always operated.

従来、起動の方式にかかわらず、より迅速に起動する手法が提案されている(例えば、特許文献1参照。)。これは、第1のコンピュータが第2の起動方式で第1のオペレーティングシステムを起動する場合、第2のオペレーティングシステムの起動が完了してから第1のコンピュータにおける第1のオペレーティングシステムの起動が完了するまでの間、第1のコンピュータと共用する入力手段から使用者の指示が取得される第2のユーザインタフェースの処理を行い、第1のコンピュータが第1の起動方式で第1のオペレーティングシステムを起動する場合、第2のユーザインタフェースの処理の実行を抑制するようにした場合には、使用者の操作に応じた状態になるようにするもので、休止状態としてサスペンド状態またはハイバネーションに遷移するようにした場合には、サスペンド状態またはハイバネーションからレジュームすることができる。   Conventionally, a method of starting up more quickly has been proposed regardless of the starting method (see, for example, Patent Document 1). This is because when the first computer boots the first operating system using the second boot method, the first computer completes booting of the first operating system after the booting of the second operating system is completed. In the meantime, a second user interface process is performed in which a user's instruction is acquired from input means shared with the first computer, and the first computer uses the first boot method to install the first operating system. When starting, if the execution of the processing of the second user interface is suppressed, the state is changed according to the user's operation, so that the state transits to the suspended state or hibernation as the hibernation state. You can resume from suspend or hibernation. The

特開2006−355325号公報JP 2006-355325 A

サスペンドレジューム機能をサポートしていないデバイスを含む組み込みシステムであっても、システム稼動状態で着脱可能なデバイスなど、デバイスドライバをシステム稼働中にロード、アンロードできるデバイスについては、サスペンド前にドライバをアンロードし、レジューム後デバイスを再初期化する手法を適用することが可能である。しかしながら、この手法は、プラグアンドプレイのように、システム稼働中にアンロードできないデバイスには適用できないという問題がある。   Even for embedded systems that include devices that do not support the suspend / resume function, devices that can be loaded and unloaded while the system is running, such as devices that can be removed while the system is running, must be unloaded before suspension. It is possible to apply a technique of loading and reinitializing the device after resuming. However, this method has a problem that it cannot be applied to a device that cannot be unloaded during system operation, such as plug and play.

また、サスペンドレジューム機能をサポートするようにデバイスドライバを修正可能であっても、ドライバの版権等が障害となり、デバイスドライバの修正を行うことができず、対応できない場合がある。   Even if the device driver can be modified so as to support the suspend / resume function, the copyright of the driver becomes an obstacle, and the device driver cannot be modified and may not be supported.

上記した特許文献1による手法では、ホストCPUとリアルタイムCPUという複数のCPUを必要とするだけでなく、プロセスとデバイスの不一致による問題の対策には対応できていない。   The method disclosed in Patent Document 1 described above requires not only a plurality of CPUs, that is, a host CPU and a real-time CPU, but also cannot cope with a countermeasure for a problem caused by a mismatch between a process and a device.

そこで、本発明は、上記の問題に鑑みてなされたもので、サスペンドレジューム機能をサポートしていないデバイスを含む組み込みシステムであっても、システム全体のサスペンドレジュームを可能にする組み込みシステムの制御方法を提供するものである。   Therefore, the present invention has been made in view of the above problems, and there is provided a control method for an embedded system that enables suspend resume of the entire system even in an embedded system including a device that does not support the suspend / resume function. It is to provide.

本発明の一態様によれば、サスペンドレジューム機能をサポートしていないデバイスを、その一部に含む組み込みシステムにおける制御方法であって、前記デバイスについては、サスペンド処理の開始からレジューム処理の完了までの間、割り込みを禁止し、レジューム処理完了時、前記デバイスの初期化を行ってから割り込みを許可する組み込みシステムにおける制御方法が提供される。   According to one aspect of the present invention, there is provided a control method in an embedded system that includes a device that does not support a suspend / resume function as part of the device, from the start of the suspend process to the completion of the resume process. In the meantime, a control method in an embedded system is provided in which interrupts are prohibited, and when the resume processing is completed, the device is initialized and then interrupts are permitted.

本発明の別の一態様によれば、前記サスペンドレジューム機能をサポートしていないデバイスを使用するアプリケーションについては、システムのレジューム処理後、前記デバイスを使用する前に、前記デバイス用ドライバを再オープンし、前記デバイス用ドライバ情報の再読み込みを行うことを特徴とする組み込みシステムにおける制御方法が提供される。   According to another aspect of the present invention, for an application using a device that does not support the suspend / resume function, the device driver is reopened after the system is resumed and before the device is used. A control method in an embedded system is provided, wherein the device driver information is re-read.

本発明によれば、サスペンドレジューム機能をサポートしていないデバイスを含む組み込みシステムであっても、システム全体のサスペンドレジュームが可能になる。   According to the present invention, even in an embedded system including a device that does not support the suspend / resume function, it is possible to suspend / resume the entire system.

本発明の実施形態に係る組み込みシステムの概略構成を示すブロック図である。1 is a block diagram showing a schematic configuration of an embedded system according to an embodiment of the present invention. 本実施形態に係る組み込みシステムのレイヤ構成を示す図である。It is a figure which shows the layer structure of the embedded system which concerns on this embodiment. サスペンドレジューム機能未対応のデバイスを管理する例を説明する図である。It is a figure explaining the example which manages the device not corresponding to a suspend resume function. 本実施形態におけるサスペンド処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the suspend process in this embodiment. レジューム前のカーネルの起動処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the starting process of the kernel before resuming. レジュームの本処理の流れを示すフローチャートである。It is a flowchart which shows the flow of this process of resume.

以下、本発明の一実施の形態について、図面を参照して説明する。尚、各図において同一箇所については同一の符号を付すとともに、重複した説明は省略する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In the drawings, the same portions are denoted by the same reference numerals, and redundant description is omitted.

図1は、本発明の実施形態に係る組み込みシステムの概略構成を示すブロック図である。組み込みシステム100は、特定の機能を実現するために家電製品や機械等に組み込まれるコンピュータシステムであって、例えば、図1に示すように、CPU101、メモリ102、入力装置103、表示装置104、記憶装置105、内部バス106および電源部107等を備えている。   FIG. 1 is a block diagram showing a schematic configuration of an embedded system according to an embodiment of the present invention. The embedded system 100 is a computer system that is incorporated into a home appliance or machine in order to realize a specific function. For example, as shown in FIG. 1, a CPU 101, a memory 102, an input device 103, a display device 104, a storage A device 105, an internal bus 106, a power supply unit 107, and the like are provided.

CPU101は、組み込みシステム100が内蔵するCPUであり、組み込みシステム100の全体の制御も司る。   The CPU 101 is a CPU built in the embedded system 100 and controls the entire embedded system 100.

メモリ102は、揮発性半導体メモリから構成されるメモリ装置である。メモリ102には、CPU101が処理するプログラムや一時データが格納される。   The memory 102 is a memory device composed of a volatile semiconductor memory. The memory 102 stores programs processed by the CPU 101 and temporary data.

入力装置103は、例えばキーボードやマウス、タッチパッドである。組み込みシステム100に備えられており、コマンド等ユーザの指示を入力するのに利用される。   The input device 103 is, for example, a keyboard, a mouse, or a touch pad. It is provided in the embedded system 100 and is used to input user instructions such as commands.

表示装置104は、例えば組み込みシステム100が内蔵するLCDディスプレイである。   The display device 104 is an LCD display built in the embedded system 100, for example.

記憶装置105は、組み込みシステム100が内蔵するHDD装置あるいはSSD装置である。CPU101が処理するプログラムはあらかじめ記憶装置105に格納される。また、ハイバネーションする場合、記憶装置105にメモリ等のデータを保存する場所としても使用される。   The storage device 105 is an HDD device or an SSD device built in the embedded system 100. A program processed by the CPU 101 is stored in the storage device 105 in advance. In the case of hibernation, the storage device 105 is also used as a place for storing data such as a memory.

内部バス106は、組み込みシステム100内の各構成ユニットを接続し、データの交換を行うためのバスである。各構成ユニットは内部バス106を介してデータの授受を実現する。   The internal bus 106 is a bus for connecting the constituent units in the embedded system 100 and exchanging data. Each component unit realizes data exchange via the internal bus 106.

電源部107は、組み込みシステム100に内蔵する各構成部分に電力を供給する。また、必要に応じて構成部分毎に電力を供給したり遮断したりすることができる。例えば、サスペンドに移行した時にはメモリ102に電力を供給したままにするが、他の構成部分の電力は遮断する場合が考えられる。   The power supply unit 107 supplies power to each component included in the embedded system 100. Moreover, electric power can be supplied or interrupted for each component as necessary. For example, it is conceivable that power is kept supplied to the memory 102 when shifting to suspend, but the power of other components is cut off.

本実施形態では、CPU系列の依存性がなく、かつ、各種デバイスに柔軟に対応可能なOSであるLinux(登録商標)を例にとって、ハイバネーション制御を適用するものである。一般に、OSは、少なくとも、(1)周辺機器を管理するデバイスドライバ、(2)メモリの管理、(3)ファイルシステムの管理の機能を備える。係るOSの中核となる基本的な機能を担う部分がOSのカーネル(Kernel)であり、コンピュータのどの部分にでもアクセスできるカーネル・モード(Kernel Mode)で動作する。   In the present embodiment, hibernation control is applied, taking as an example Linux (registered trademark), which is an OS that does not depend on a CPU system and can flexibly support various devices. Generally, an OS includes at least functions of (1) a device driver that manages peripheral devices, (2) memory management, and (3) file system management. The part responsible for the basic functions of the core of the OS is the OS kernel, which operates in a kernel mode that allows access to any part of the computer.

コンピュータで稼働しているソフトウェアの機能は、レイヤ(層)構成で見ることができる。図2は、本実施形態に係る組み込みシステムのレイヤ構成を示す図である。図2に示すように、このレイヤ構成は、アプリケーションレイヤと、OSレイヤと、デバイスドライバレイヤと、ハードウェアレイヤとから成っている。   The functions of the software running on the computer can be seen in a layer configuration. FIG. 2 is a diagram showing a layer configuration of the embedded system according to the present embodiment. As shown in FIG. 2, this layer configuration includes an application layer, an OS layer, a device driver layer, and a hardware layer.

アプリケーションレイヤは、最上位のレイヤであって、OSの上位レイヤのソフトウェア群である。   The application layer is the highest layer and is a software group of an upper layer of the OS.

OSレイヤは、アプリケーションレイヤの下位に位置するレイヤであって、ハードウェアの制御をはじめ、タスク(仕事)やファイルシステムの管理、ネットワークへの接続など、システムの基幹的な機能を担う。OSカーネルが稼働している下位レイヤはカーネル空間やカーネル・モードと呼ばれるものである。   The OS layer is a layer positioned below the application layer, and is responsible for the basic functions of the system such as hardware control, management of tasks (work) and file system, connection to a network, and the like. The lower layer in which the OS kernel is operating is called kernel space or kernel mode.

デバイスドライバレイヤは、デバイス制御のためのデバイスドライバが位置するレイヤである。   The device driver layer is a layer in which a device driver for device control is located.

デバイスレイヤは、CPUやメモリ等のコンピュータを構成する各装置や、周辺機器が位置するレイヤである。組み込みシステム100に組み込まれるデバイスとしては、各種各様の仕様から成るのが通常である。そこで、本実施形態においては、サスペンドレジューム機能に対応するデバイスと、サスペンドレジューム機能未対応のデバイスとに、分けて制御する。例えば、多くのHDD装置あるいはSSD装置、USBメモリ等は、サスペンドレジューム機能未対応のデバイスに該当するものが存在する。   The device layer is a layer in which each device constituting the computer such as a CPU and a memory and peripheral devices are located. The devices incorporated in the embedded system 100 are usually composed of various specifications. Therefore, in the present embodiment, control is performed separately for a device that supports the suspend / resume function and a device that does not support the suspend / resume function. For example, many HDD devices, SSD devices, USB memories, and the like correspond to devices that do not support the suspend / resume function.

本実施形態では、サスペンドレジューム機能未対応のデバイスが組み込まれている組み込みシステム100においても、Linux(登録商標)OSのハイバネーションのサスペンドレジューム機能を円滑に動作させる場合を例にとって説明する。   In the present embodiment, an example will be described in which the suspend / resume function of the Linux (registered trademark) OS hibernation smoothly operates even in the embedded system 100 in which a device that does not support the suspend / resume function is incorporated.

アプリケーションをインストールした組み込みシステム100を動作させ、ハイバネーション制御を行った場合、サスペンドレジューム機能未対応のデバイスにおいては、いわゆる誤動作が起きる。そこで、デバイスの誤動作を引き起こす要因について、鋭意、解析したところによれば、それらの要因は以下のようになる。   When the embedded system 100 in which the application is installed is operated and the hibernation control is performed, a so-called malfunction occurs in a device that does not support the suspend / resume function. Thus, according to the earnest and analysis of factors that cause device malfunction, these factors are as follows.

(1)デバイスのリソース(コンフィグレーション設定)とハードウェア側設定との不一致
一般に、デバイスのリソースとハードウェア側の設定はハイバネーション制御の前後で保存、復元される。しかし、デバイスドライバの実装が不十分で、サスペンドレジューム機能未対応な場合、ドライバのリソース(コンフィグレーション設定)とハードウェア側の値が一致せず誤動作が発生する可能性がある。
(1) Mismatch between device resources (configuration settings) and hardware settings Generally, device resources and hardware settings are saved and restored before and after hibernation control. However, if the device driver implementation is insufficient and the suspend / resume function is not supported, the driver resource (configuration setting) and the hardware value do not match, which may cause a malfunction.

コンフィグレーション設定における誤動作としては、例えば、レジスタ値が異なる、HDD装置の転送レートが一致しない、DMA転送のモードが異なる場合などである。   Malfunctions in configuration settings include, for example, different register values, mismatched HDD device transfer rates, and different DMA transfer modes.

また、ハードウェア側設定における誤動作としては、例えば、電源のON/OFF状態が一致しない場合があげられる。   Moreover, as a malfunction in the hardware side setting, for example, there is a case where the ON / OFF states of the power supply do not match.

(2)プロセスとデバイスとの情報の不一致
ハイバネーション制御の前後でデバイスの状態が変わっても、プロセスはその旨認識できず、ハイバネーション制御前の状態でアクセス、誤動作が発生する可能性がある。例えば、ドライバをオープンした際のポインタ値が一致しない場合やプロセスリソースにおけるデータとドライバがアクセスするデータとが一致しない場合として現われる。
(2) Information mismatch between process and device Even if the state of the device changes before and after the hibernation control, the process cannot recognize it, and there is a possibility that an access or malfunction occurs before the hibernation control. For example, it appears when the pointer value does not match when the driver is opened or when the data in the process resource does not match the data accessed by the driver.

したがって、組み込みシステム100がサスペンドレジューム機能未対応のデバイスを備える場合には、サスペンドレジューム機能対応のデバイスとは、異なったハイバネーション制御をするのが好適である。   Accordingly, when the embedded system 100 includes a device that does not support the suspend / resume function, it is preferable to perform hibernation control different from that of the device that supports the suspend / resume function.

そこで、本実施形態においては、サスペンドレジューム機能未対応のデバイスをあらかじめ把握、管理しておく。   Therefore, in this embodiment, devices that do not support the suspend / resume function are grasped and managed in advance.

図3は、サスペンドレジューム機能未対応のデバイスについて、「devices」ファイルを作成し管理する例を説明する図である。図3に示す例では、Linux(登録商標)カーネルによって提供される仮想ファイルシステムであるsysfsインタフェースを用いる。sysfsインタフェースは、デバイスやデバイスドライバについての情報をカーネルモデルからユーザ空間へエクスポートし、設定のために使われる。図3に示すように、/sys/power ディレクトリ下に「devices」ファイルを作成し管理する。<device番号>は、サスペンドレジューム機能未対応のデバイスのデバイス名である。したがって、サスペンドレジューム機能に対応可能なデバイスについては、本実施形態に係る制御方法を適用する必要が無いので、「devices」ファイルに表示せず、通常のサスペンドレジューム処理を行うことになる。図3において、デバイス名=0(通常のサスペンドレジューム処理を行う)、デバイス名=1(初期化を行う)を表わしている。   FIG. 3 is a diagram illustrating an example of creating and managing a “devices” file for a device that does not support the suspend / resume function. In the example shown in FIG. 3, a sysfs interface which is a virtual file system provided by a Linux (registered trademark) kernel is used. The sysfs interface exports information about devices and device drivers from the kernel model to user space and is used for configuration. As shown in FIG. 3, a “devices” file is created and managed under the / sys / power directory. <device number> is the device name of a device that does not support the suspend / resume function. Therefore, since it is not necessary to apply the control method according to the present embodiment to a device that can support the suspend / resume function, normal suspend / resume processing is performed without displaying the device in the “devices” file. In FIG. 3, device name = 0 (normal suspend / resume processing is performed) and device name = 1 (initialization is performed) are shown.

次に、本実施形態の制御方法におけるサスペンド処理について説明する。サスペンド処理は、プロセス、デバイス、仮想コンソール、CPUの停止処理を行い、その状態のメモリからサスペンドイメージを作成し、デバイス、仮想コンソール、CPUを一度復帰させた状態にして、サスペンドイメージをスワップ領域へ書き込む。その後、システムの電力を落とすことで終了する。   Next, the suspend process in the control method of this embodiment will be described. Suspend processing performs process, device, virtual console, and CPU stop processing, creates a suspend image from the memory in that state, returns the device, virtual console, and CPU to the state once, and then suspends the image to the swap area. Write. Thereafter, the process is terminated by turning off the power of the system.

上記した図3に示すテーブルで管理されるサスペンドレジューム機能未対応のデバイスについては、デバイスのサスペンド処理を行うところで割り込みの禁止を行い、以降の処理を行わない。プロセスからのアクセスも禁止の状態のままサスペンド処理する。   For a device that does not support the suspend / resume function and is managed by the table shown in FIG. 3, the interrupt is prohibited when the device suspend process is performed, and the subsequent processes are not performed. Suspend processing is performed while access from the process is prohibited.

図4にしたがって、以下に、本実施形態の制御方法におけるサスペンド処理の流れを説明する。図4に示すように、まず、仮想コンソールをサスペンド処理用に設定する(ステップS401)。例えば、キー操作により、制御画面を切り換える。次いで、プロセスとカーネルスレッドを停止する(ステップS402)。次に、メモリの回収を行い、CPU系列固有の処理を実行する(ステップS403)。次いで、仮想コンソールをサスペンド処理する(ステップS404)。その後、組み込みシステムに含まれる各デバイスについて、サスペンドレジューム機能未対応かどうかの判断を行う(ステップS405)。サスペンドレジューム機能をサポートしているデバイスであれば、当該デバイスについてサスペンド処理を実行する(ステップS406)。サスペンドレジューム機能をサポートしていないデバイスであれば、当該デバイスの割り込みを禁止する(ステップS407)。次いで、起動(ブート)に使用しないCPUを停止する(ステップS408)。次いで、サスペンド時の待避データの全体であるサスペンドイメージを作成する(ステップS409)。そして、停止しているCPUを復帰させ(ステップS410)、CPU系列固有の処理を実行する(ステップS411)。その後、サスペンドレジューム機能未対応のデバイスかどうかの判断を行う(ステップS412)。サスペンドレジューム機能をサポートしているデバイスであれば、当該デバイスについてレジューム処理を行う(ステップS413)。サスペンドレジューム機能をサポートしていないデバイスであれば、当該デバイスについてはレジューム処理しない。次に、仮想コンソールについてレジューム処理を行う(ステップS414)。次に、サスペンドイメージをスワップ領域へ書き込む(ステップS415)。そして、パワーダウンし、サスペンド処理を完了する(ステップS416)。   The flow of suspend processing in the control method of this embodiment will be described below with reference to FIG. As shown in FIG. 4, first, the virtual console is set for suspend processing (step S401). For example, the control screen is switched by a key operation. Next, the process and the kernel thread are stopped (step S402). Next, the memory is collected and a process specific to the CPU series is executed (step S403). Next, the virtual console is suspended (step S404). Thereafter, it is determined whether or not the suspend / resume function is not supported for each device included in the embedded system (step S405). If the device supports the suspend / resume function, the suspend process is executed for the device (step S406). If the device does not support the suspend / resume function, the interrupt of the device is prohibited (step S407). Next, CPUs that are not used for startup (booting) are stopped (step S408). Next, a suspend image that is the entire saved data at the time of suspend is created (step S409). Then, the stopped CPU is restored (step S410), and processing unique to the CPU series is executed (step S411). Thereafter, it is determined whether the device does not support the suspend / resume function (step S412). If the device supports the suspend / resume function, the resume process is performed for the device (step S413). If the device does not support the suspend / resume function, the resume processing is not performed for the device. Next, a resume process is performed for the virtual console (step S414). Next, the suspend image is written into the swap area (step S415). Then, the system is powered down and the suspend process is completed (step S416).

次に、レジューム処理について説明する。レジューム処理は、カーネルの起動処理の後に実行される。まず、スワップ領域にサスペンドイメージが存在するかどうかのチェックを行う。サスペンドイメージが存在すれば、プロセスを停止し、サスペンドイメージをメモリ上に読み込む。次いで、仮想コンソール、デバイス、起動(ブート)に使用しないCPUを停止させた状態で、サスペンドイメージのリストアとCPUのレジスタ情報の復元を行う。次いで、CPU、デバイス、仮想コンソール及びプロセスについて、それぞれの再開処理を行い、レジューム処理を終了する。   Next, the resume process will be described. The resume process is executed after the kernel startup process. First, it is checked whether a suspend image exists in the swap area. If a suspend image exists, the process is stopped and the suspend image is read into the memory. Next, the suspended image is restored and the CPU register information is restored while the virtual console, the device, and the CPU that is not used for startup (booting) are stopped. Next, the CPU, the device, the virtual console, and the process are resumed, and the resume process ends.

上記した図3に示すテーブルで管理されるサスペンドレジューム機能未対応のデバイスについては、当該デバイスのレジューム処理のタイミングで再度初期化することによって、コンフィグレーション設定とハードウェア側設定との不一致を回避する。そして、当該デバイスを使用するアプリケーションについては、システムのレジューム処理後、当該デバイスを使用する前に、当該デバイス用ドライバを再オープンし、デバイス用ドライバ情報の再読み込みを行い、不一致を回避する。その後、割り込みを許可し、通常の状態にもどる。   For devices that are not supported by the suspend / resume function managed in the table shown in FIG. 3 described above, re-initialize at the timing of the resume processing of the device, thereby avoiding inconsistencies between configuration settings and hardware-side settings. . For an application that uses the device, after the system resume process, before using the device, the device driver is reopened, and the device driver information is reread to avoid inconsistencies. After that, the interrupt is permitted and the normal state is restored.

尚、当該デバイスの初期化の後、一定の通知をアプリケーションに通知することが好適である。   Note that it is preferable to notify the application of a certain notification after the initialization of the device.

また、当該デバイスは、プロセスのカーネルスレッド再開の直後に、一つのアプリケーションがアクティブになった時に、当該デバイス用ドライバを再オープンし、そのデバイス用ドライバ情報の再読み込みを行うことが好適である。   Further, it is preferable that the device reopens the device driver and rereads the device driver information when one application becomes active immediately after the kernel thread of the process is resumed.

以下に、本実施形態の制御方法におけるレジューム処理の流れを図5、図6にしたがって説明する。図5は、レジューム前のカーネルの起動処理の流れを示すフローチャートである。図5に示すように、まず、Boot Loaderがカーネルをメモリに展開する(ステップS501)。次いで、割り込みを禁止し、マシン依存部、タイマ、ページテーブルの初期化を実行する(ステップS502)。次に、スケジューラの初期化を実行する(ステップS503)。次に、割り込みテーブルを初期化し、割り込みを許可する(ステップS504)。その後、バス等のサブシステムの初期化を実行する(ステップS505)。次いで、続いて、ファイルシステムのマウントを実行し、ルートファイルシステムを初期化する(ステップS506)。次いで、デバイスドライバを初期化して、レジューム前のカーネルの起動処理を完了する(ステップS507)。   Below, the flow of the resume process in the control method of this embodiment is demonstrated according to FIG. 5, FIG. FIG. 5 is a flowchart showing the flow of the kernel startup process before resuming. As shown in FIG. 5, first, the boot loader expands the kernel in the memory (step S501). Next, interrupts are prohibited, and machine-dependent units, timers, and page tables are initialized (step S502). Next, initialization of the scheduler is executed (step S503). Next, the interrupt table is initialized and an interrupt is permitted (step S504). Thereafter, initialization of a subsystem such as a bus is executed (step S505). Next, subsequently, the file system is mounted to initialize the root file system (step S506). Next, the device driver is initialized, and the kernel startup process before resuming is completed (step S507).

図6は、レジュームの本処理の流れを示すフローチャートである。図6に示すように、まず、仮想コンソールをサスペンド処理用に設定する(ステップS601)。次いで、プロセスとカーネルスレッドを停止する(ステップS602)。次に、サスペンドイメージをスワップ領域から読み込む(ステップS603)。次いで、仮想コンソールをサスペンドする(ステップS604)。その後、サスペンドレジューム機能未対応のデバイスかどうかの判断を行う(ステップS605)。サスペンドレジューム機能をサポートしているデバイスであれば、当該デバイスについてサスペンド処理を実行する(ステップS606)。サスペンドレジューム機能未対応のデバイスであれば、当該デバイスの割り込みを禁止する(ステップS607)。次いで、起動(ブート)に使用しないCPUを停止する(ステップS608)。次いで、サスペンドイメージをメモリに展開する(ステップS609)。そして、停止しているCPUを復帰させ(ステップS610)、CPU系列固有の処理を実行する(ステップS611)。その後、サスペンドレジューム機能未対応のデバイスかどうかの判断を行う(ステップS612)。サスペンドレジューム機能をサポートしているデバイスであれば、当該デバイスについてレジューム処理を行う(ステップS613)。サスペンドレジューム機能未対応のデバイスであれば、当該デバイスを初期化し(ステップS614)、割り込みを許可する(ステップS615)。次に、仮想コンソールについてレジューム処理を行う(ステップS616)。次に、プロセスとカーネルスレッドを再開する(ステップS617)。その後、サスペンドレジューム機能未対応のデバイスかどうかの判断を行う(ステップS618)。サスペンドレジューム機能をサポートしているデバイスであれば、仮想コンソールを元に戻してレジューム処理を完了する(ステップS619)。サスペンドレジューム機能未対応のデバイスであれば、当該デバイスの再オープン、再読み込みを行い(ステップS620)、ステップS619に移る。   FIG. 6 is a flowchart showing the flow of the resume process. As shown in FIG. 6, first, the virtual console is set for suspend processing (step S601). Next, the process and the kernel thread are stopped (step S602). Next, the suspend image is read from the swap area (step S603). Next, the virtual console is suspended (step S604). Thereafter, it is determined whether the device does not support the suspend / resume function (step S605). If the device supports the suspend / resume function, the suspend process is executed for the device (step S606). If the device does not support the suspend / resume function, the interrupt of the device is prohibited (step S607). Next, CPUs that are not used for startup (booting) are stopped (step S608). Next, the suspend image is expanded in the memory (step S609). Then, the stopped CPU is returned (step S610), and processing unique to the CPU series is executed (step S611). Thereafter, it is determined whether the device does not support the suspend / resume function (step S612). If the device supports the suspend / resume function, the resume process is performed for the device (step S613). If the device does not support the suspend / resume function, the device is initialized (step S614), and an interrupt is permitted (step S615). Next, a resume process is performed for the virtual console (step S616). Next, the process and the kernel thread are resumed (step S617). Thereafter, it is determined whether the device does not support the suspend / resume function (step S618). If the device supports the suspend / resume function, the virtual console is returned to the original state and the resume process is completed (step S619). If the device does not support the suspend / resume function, the device is reopened and reread (step S620), and the process proceeds to step S619.

尚、Serialなどのコンソールデバイスや、ハイバネーション情報を記憶する領域やルートファイルシステムで使用するHDD装置などの一部のデバイスでは、プロセスのスケジューリングが止められ、カーネルがハイバネーション処理(サスペンド/レジューム)を実行しているときも、カーネルが使用するため割り込み禁止が働かず、動作する。したがって、これらのデバイスに対しては、デバイスドライバにおいてサスペンドレジューム機能に対応できるように実装する必要がある。   In some devices, such as serial devices such as console devices and HDD devices used in the hibernation information storage area and root file system, process scheduling is stopped and the kernel executes hibernation processing (suspend / resume). Even when it is running, interrupts do not work because it is used by the kernel, and it works. Therefore, it is necessary to mount these devices so that the device driver can support the suspend / resume function.

本実施形態によれば、デバイスドライバのリソース(コンフィグレーション設定)とハードウェア側設定との不一致が解消される。また、ドライバをオープンしたときのポインタやプロセスリソースの不一致が解消されるので、サスペンドレジューム機能に対応していないドライバを含む組み込みシステムにおいて、不備を補完することができるので、ハイバネーション制御が円滑に行える。   According to the present embodiment, the mismatch between the device driver resource (configuration setting) and the hardware setting is resolved. Also, since the mismatch of pointers and process resources when the driver is opened is resolved, deficiencies can be compensated for in embedded systems that include drivers that do not support the suspend / resume function, so that hibernation control can be performed smoothly. .

なお、本発明は上記の実施形態のそのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記の実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   Note that the present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Moreover, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the above embodiments. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

101・・・CPU、102・・・メモリ、103・・・入力装置、104・・・表示装置、105・・・記憶装置、106・・・内部バス、107・・・電源部、100・・・組み込みシステム。   101 ... CPU, 102 ... memory, 103 ... input device, 104 ... display device, 105 ... storage device, 106 ... internal bus, 107 ... power supply unit, 100 ... -Embedded system.

Claims (10)

サスペンドレジューム機能をサポートしていないデバイスを、その一部に含む組み込みシステムにおける制御方法であって、
前記デバイスについては、サスペンド処理の開始からレジューム処理の完了までの間、割り込みを禁止し、レジューム処理完了時、前記デバイスの初期化を行ってから割り込みを許可することを特徴とする組み込みシステムの制御方法。
A control method in an embedded system including a device that does not support the suspend / resume function as a part thereof,
For the device, the interrupt is prohibited from the start of the suspend process to the completion of the resume process, and the interrupt is permitted after the device is initialized when the resume process is completed. Method.
前記サスペンドレジューム機能をサポートしていないデバイスを使用するアプリケーションについては、システムのレジューム処理後、前記デバイスを使用する前に、前記デバイス用ドライバを再オープンし、前記デバイス用ドライバ情報の再読み込みを行うことを
特徴とする請求項1記載の組み込みシステムの制御方法。
For an application that uses a device that does not support the suspend / resume function, the device driver is reopened and the device driver information is reloaded after the system resume process and before using the device. The method of controlling an embedded system according to claim 1.
前記デバイスの初期化の後、一定の通知をアプリケーションに通知することを特徴とする請求項2記載の組み込みシステムの制御方法。   3. The embedded system control method according to claim 2, wherein after the device is initialized, a predetermined notification is notified to the application. 前記デバイスは、プロセスのカーネルスレッド再開の直後に、一つのアプリケーションがアクティブになった時に、前記デバイス用ドライバを再オープンし、前記デバイス用ドライバ情報の再読み込みを行うことを特徴とする請求項2記載の組み込みシステムの制御方法。   3. The device reopens the device driver and rereads the device driver information when one application becomes active immediately after the kernel thread of the process is resumed. The embedded system control method described. 前記デバイスは、プロセスのカーネルスレッド再開後に、前記デバイスを使用する前に、前記デバイス用ドライバを再オープンし、前記デバイス用ドライバ情報の再読み込みを行うことを特徴とする請求項2記載の組み込みシステムの制御方法。   3. The embedded system according to claim 2, wherein the device reopens the device driver and rereads the device driver information before using the device after restarting a kernel thread of a process. Control method. 前記割り込みの禁止は、前記サスペンドレジューム機能をサポートしていないデバイスのサスペンド処理を行うところで割り込みの禁止を行い、以降の処理を行わず、プロセスからのアクセスも禁止の状態のままサスペンド処理することを特徴とする請求項1乃至請求項5のいずれか1項に記載の組み込みシステムの制御方法。   The prohibition of the interrupt means that the interrupt is prohibited when the suspend process of the device that does not support the suspend / resume function is performed, and the suspend process is performed while the subsequent process is not performed and the access from the process is also prohibited. The method for controlling an embedded system according to claim 1, wherein the embedded system is controlled. 前記サスペンドレジューム機能をサポートしていないデバイスは、前記デバイスのレジューム処理のタイミングで再度初期化し、コンフィグレーション設定とハードウェア側設定との不一致を回避することを特徴とする請求項1乃至請求項6のいずれか1項に記載の組み込みシステムの制御方法。   7. The device that does not support the suspend / resume function is reinitialized at the timing of the resume process of the device to avoid a mismatch between the configuration setting and the hardware side setting. The embedded system control method according to any one of the above. 前記サスペンドレジューム機能をサポートしていないデバイスは、ファイルを作成し、管理することを特徴とする請求項1乃至請求項7のいずれか1項に記載の組み込みシステムの制御方法。   8. The embedded system control method according to claim 1, wherein the device that does not support the suspend / resume function creates and manages a file. サスペンドレジューム機能をサポートしているデバイスについては、割り込みを禁止せず、通常のサスペンドレジューム処理を実行することを特徴とする請求項1乃至請求項8のいずれか1項に記載の組み込みシステムの制御方法。   The embedded system control according to any one of claims 1 to 8, wherein a normal suspend / resume process is executed for a device supporting the suspend / resume function without prohibiting an interrupt. Method. 前記組み込みシステムは、Linux(登録商標)OS(オペレーティング・システム)で制御されることを特徴とする請求項1乃至請求項9のいずれか1項に記載の組み込みシステムの制御方法。   The embedded system control method according to any one of claims 1 to 9, wherein the embedded system is controlled by a Linux (registered trademark) OS (operating system).
JP2009153808A 2009-06-29 2009-06-29 Control method for built-in system Pending JP2011008688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009153808A JP2011008688A (en) 2009-06-29 2009-06-29 Control method for built-in system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009153808A JP2011008688A (en) 2009-06-29 2009-06-29 Control method for built-in system

Publications (1)

Publication Number Publication Date
JP2011008688A true JP2011008688A (en) 2011-01-13

Family

ID=43565229

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009153808A Pending JP2011008688A (en) 2009-06-29 2009-06-29 Control method for built-in system

Country Status (1)

Country Link
JP (1) JP2011008688A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3340010A1 (en) 2016-12-22 2018-06-27 Canon Kabushiki Kaisha Printing apparatus and method for controlling the same
JP2021163315A (en) * 2020-04-01 2021-10-11 レノボ・シンガポール・プライベート・リミテッド Information processing apparatus and control method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3340010A1 (en) 2016-12-22 2018-06-27 Canon Kabushiki Kaisha Printing apparatus and method for controlling the same
US10425545B2 (en) 2016-12-22 2019-09-24 Canon Kabushiki Kaisha Printing apparatus and method for controlling the same
JP2021163315A (en) * 2020-04-01 2021-10-11 レノボ・シンガポール・プライベート・リミテッド Information processing apparatus and control method
US11256301B2 (en) 2020-04-01 2022-02-22 Lenovo (Singapore) Pte. Ltd. Information processing apparatus and control method

Similar Documents

Publication Publication Date Title
US10007546B2 (en) Operating-system exchanges using memory-pointer transfers
JP2007206885A (en) Computer system and system starting method
JP5119686B2 (en) Information processing apparatus and setting method
US6732280B1 (en) Computer system performing machine specific tasks before going to a low power state
JP4665040B2 (en) Computer and access control method
EP2495655B1 (en) Method for switching operating system and electronic apparatus using the same
TWI436199B (en) Method and controller for power management
US10725770B2 (en) Hot-swapping operating systems using inter-partition application migration
US8799631B2 (en) Dynamically select operating system (OS) to boot based on hardware states
JP2011100431A (en) Device and method for controlling virtual machine
JPH09293041A (en) Automatic enabling method of peripheral device and storage medium storing automatic enable program of peripheral device
KR20060052086A (en) Information processing system, information processing method, and program
JP2015102889A (en) Method for updating firmware, electronic device, computer and computer program
US11972243B2 (en) Memory device firmware update and activation without memory access quiescence
GB2529740A (en) Data processing systems
JP5126686B2 (en) Information processing apparatus, operation method of information processing apparatus, and program thereof
EP1037133A1 (en) Method and apparatus for alternation between instances of operating systems in computer systems
JP2008186357A (en) Data processor
JP5578811B2 (en) Information processing apparatus, information processing apparatus control method, and program
JP2011008688A (en) Control method for built-in system
KR100994723B1 (en) selective suspend resume method of reducing initial driving time in system, and computer readable medium thereof
US20160004539A1 (en) Operating environment switching between a primary and a secondary operating system
JP5636276B2 (en) Semiconductor device
TWI605332B (en) Method and device for advanced configuration and power interface (acpi) sleep-state support using cpu-only reset
JP2011013836A (en) Memory arrangement management device and microprocessor