JP2015064638A - Computer device, interruption control method and computer program - Google Patents
Computer device, interruption control method and computer program Download PDFInfo
- Publication number
- JP2015064638A JP2015064638A JP2013196637A JP2013196637A JP2015064638A JP 2015064638 A JP2015064638 A JP 2015064638A JP 2013196637 A JP2013196637 A JP 2013196637A JP 2013196637 A JP2013196637 A JP 2013196637A JP 2015064638 A JP2015064638 A JP 2015064638A
- Authority
- JP
- Japan
- Prior art keywords
- bios
- cpu
- processing
- processing unit
- unit
- 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
- 238000000034 method Methods 0.000 title claims description 154
- 238000004590 computer program Methods 0.000 title claims description 17
- 230000008569 process Effects 0.000 claims description 117
- 230000006870 function Effects 0.000 claims description 39
- 230000006266 hibernation Effects 0.000 claims description 30
- 238000012544 monitoring process Methods 0.000 claims description 7
- 238000011084 recovery Methods 0.000 claims description 2
- 230000007958 sleep Effects 0.000 claims 2
- 230000000284 resting effect Effects 0.000 abstract 2
- 238000010586 diagram Methods 0.000 description 7
- 230000007704 transition Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本発明は、OS(Operating System)に基づいた処理(OS処理)を実行しているコンピュータ装置が、割り込み処理としてBIOS(Basic Input / Output System)に基づいた処理(BIOS処理)を実行する技術に関する。 The present invention relates to a technique in which a computer device executing processing (OS processing) based on an OS (Operating System) executes processing (BIOS processing) based on BIOS (Basic Input / Output System) as interrupt processing. .
例えば、ハイエンドサーバ等で要求される高RAS(Reliability (信頼性)、Availability (可用性)、Serviceability (保守性))機能を実現するために、OS処理中のCPU(Central Processing Unit)がその高RAS機能に関わるBIOS処理を間欠的に行うことがある。例えば、CPUがSMI(System management interrupts (システム管理割り込み))という通知を受け取ると、SMM(System Management Mode)と呼ばれる動作モードに遷移する(例えば、非特許文献1参照)。このSMM中においては、CPUは、BIOSに基づいた処理(BIOS処理)を実行する。そして、CPUは、数(ミリ秒(ms))の間、当該BIOS処理を実行し、その後に、OS処理に戻る。 For example, in order to realize a high RAS (Reliability, Availability, Serviceability (maintenability)) function required by a high-end server or the like, a CPU (Central Processing Unit) that is performing OS processing has its high RAS. The BIOS process related to the function may be performed intermittently. For example, when the CPU receives a notification of SMI (System management interrupts), the CPU transits to an operation mode called SMM (System Management Mode) (see, for example, Non-Patent Document 1). In this SMM, the CPU executes a process based on the BIOS (BIOS process). Then, the CPU executes the BIOS process for a number (milliseconds (ms)), and then returns to the OS process.
ところで、SMM中のCPUは、OS処理による要求(スケジューリング管理制御)に応答しない。このため、複数のCPUを備えるコンピュータ装置において、それら複数のCPUがOS処理を実行しているときに、例えば一つのCPUだけをSMMに遷移させると、そのSMM中のCPUはOS処理による要求に応答しなくなる。これにより、当該コンピュータ装置は、SMM中のCPUがストール(停止)したと判断し、カーネルパニック(OSパニック)を引き起こしてしまう虞がある。 By the way, the CPU in the SMM does not respond to a request (scheduling management control) by OS processing. For this reason, when a plurality of CPUs are executing OS processing in a computer device having a plurality of CPUs, for example, if only one CPU is transitioned to SMM, the CPU in the SMM responds to a request by OS processing. Stop responding. As a result, the computer apparatus determines that the CPU in the SMM has stalled (stopped), and may cause a kernel panic (OS panic).
そのような問題を防止するために、コンピュータ装置は、SMIを受け取った場合に、上記全てのCPUがSMMに遷移するように制御する。 In order to prevent such a problem, when receiving the SMI, the computer device controls all the CPUs to transition to the SMM.
しかしながら、上記のように全てのCPUがSMM(BIOSに基づいて処理を実行するモード)に遷移すると、OS処理が中断することになる。このために、OS処理の処理時間が長くなるという弊害が生じてしまう。 However, when all the CPUs transition to SMM (mode in which processing is executed based on the BIOS) as described above, the OS processing is interrupted. For this reason, the bad effect that the processing time of OS processing becomes long will arise.
そこで、その弊害を回避するために、次のような処理が考えられる。つまり、割り込み処理として実行するBIOS処理(例えばSMMでもって実行する処理(SMM処理))は、短時間で処理が完了する複数のステップに分割される。そして、上記全てのCPUは、OS処理中に、BIOS処理を前記1ステップずつ間欠的に実行する。しかし、この場合には、BIOS処理(SMM処理)からOS処理に戻る処理回数が増加するので、その処理回数が増加した分、BIOS処理(SMM処理)の処理時間が長くなるという問題が生じる。 Therefore, in order to avoid the adverse effects, the following processing can be considered. That is, a BIOS process executed as an interrupt process (for example, a process executed with SMM (SMM process)) is divided into a plurality of steps that can be completed in a short time. All the CPUs execute the BIOS process intermittently step by step during the OS process. However, in this case, since the number of times of returning from the BIOS processing (SMM processing) to the OS processing increases, there is a problem that the processing time of the BIOS processing (SMM processing) becomes longer by the increase in the number of processing times.
本発明は上記課題を解決するためになされた。すなわち、本発明の主な目的は、OS処理中に割り込み処理としてBIOS処理を実行する場合に、OS処理の処理時間が長くなることを防止しつつ、BIOS処理の処理時間の短縮化を図ることができる技術を提供することにある。 The present invention has been made to solve the above problems. That is, the main object of the present invention is to shorten the processing time of the BIOS processing while preventing the processing time of the OS processing from becoming long when the BIOS processing is executed as the interrupt processing during the OS processing. It is to provide the technology that can.
上記目的を達成するために、本発明のコンピュータ装置は、
複数のCPU(Central Processing Unit)を含むCPU群と、
OS(Operating System)に基づいて前記CPUを制御するOS処理部と、
BIOS(Basic Input / Output System)に基づいて前記CPUを制御するBIOS処理部と
を備え、
前記BIOS処理部は、前記CPU群が前記OS処理部により制御されているOS処理中に、前記CPU群における設定された個数の前記CPUを、前記OSに基づいた制御の対象から外れるOS休止状態とし、当該OS休止状態の前記CPUを前記BIOSに基づいて制御することによって前記BIOSに基づいたBIOS処理を割り込み処理として実行する構成を備えている。
In order to achieve the above object, the computer apparatus of the present invention provides:
A CPU group including a plurality of CPUs (Central Processing Units);
An OS processing unit for controlling the CPU based on an OS (Operating System);
A BIOS processing unit for controlling the CPU based on BIOS (Basic Input / Output System);
The BIOS processing unit is in an OS hibernation state in which a set number of CPUs in the CPU group are excluded from control targets based on the OS during the OS process in which the CPU group is controlled by the OS processing unit. And the BIOS processing based on the BIOS is executed as an interrupt processing by controlling the CPU in the OS dormant state based on the BIOS.
本発明の割り込み制御方法は、
複数のCPU(Central Processing Unit)を含むCPU群を備え、OS(Operating System)に基づいて前記CPUを制御する機能およびBIOS(Basic Input / Output System)に基づいて前記CPUを制御する機能を有しているコンピュータ装置が、
前記CPU群が前記OS処理部により制御されているOS処理中に、前記CPU群における設定された個数の前記CPUを、前記OSに基づいた制御の対象から外れるOS休止状態とし、
当該OS休止状態の前記CPUを前記BIOSに基づいて制御することによって前記BIOSに基づいたBIOS処理を割り込み処理として実行する。
The interrupt control method of the present invention
A CPU group including a plurality of CPUs (Central Processing Units) is provided, and has a function of controlling the CPU based on an OS (Operating System) and a function of controlling the CPU based on a BIOS (Basic Input / Output System). Computer equipment
During the OS processing in which the CPU group is controlled by the OS processing unit, the set number of CPUs in the CPU group are put into an OS hibernation state that is excluded from the control target based on the OS,
The BIOS process based on the BIOS is executed as an interrupt process by controlling the CPU in the OS hibernation state based on the BIOS.
本発明のコンピュータプログラムは、
複数のCPU(Central Processing Unit)を含むCPU群を備え、OS(Operating System)に基づいて前記CPUを制御する機能およびBIOS(Basic Input / Output System)に基づいて前記CPUを制御する機能を有しているコンピュータ装置に、
前記CPU群が前記OSに基づいて制御されているOS処理中に、前記CPU群における設定された個数の前記CPUを、前記OSに基づいた制御の対象から外れるOS休止状態とする処理と、
当該OS休止状態の前記CPUを前記BIOSに基づいて制御することによって前記BIOSに基づいたBIOS処理を割り込み処理として実行する処理と
を実行させる処理手順を表す。
The computer program of the present invention is:
A CPU group including a plurality of CPUs (Central Processing Units) is provided, and has a function of controlling the CPU based on an OS (Operating System) and a function of controlling the CPU based on a BIOS (Basic Input / Output System). Computer equipment
A process of setting a set number of CPUs in the CPU group to an OS hibernation state that is excluded from a control target based on the OS during the OS process in which the CPU group is controlled based on the OS;
The processing procedure which performs the process which performs the BIOS process based on the said BIOS as an interruption process by controlling the said CPU of the said OS dormant state based on the said BIOS is represented.
なお、本発明の前記目的は、本発明のコンピュータ装置に対応する本発明の割り込み制御方法によっても達成される。また、本発明の前記目的は、本発明のコンピュータ装置および割り込み制御方法を実現するコンピュータプログラムおよびそれを記憶するコンピュータプログラム記憶媒体によっても達成される。 The object of the present invention is also achieved by the interrupt control method of the present invention corresponding to the computer apparatus of the present invention. The object of the present invention is also achieved by a computer program for realizing the computer apparatus and interrupt control method of the present invention, and a computer program storage medium for storing the computer program.
本発明によれば、OS処理中に割り込み処理としてBIOS処理を実行する場合に、OS処理の処理時間が長くなることを防止しつつ、BIOS処理の処理時間の短縮化を図ることができる。 According to the present invention, when BIOS processing is executed as interrupt processing during OS processing, it is possible to shorten the processing time of BIOS processing while preventing an increase in processing time of OS processing.
以下に、本発明に係る実施形態を図面に基づいて説明する。 Embodiments according to the present invention will be described below with reference to the drawings.
(第1実施形態)
図1は、本発明に係る第1実施形態のコンピュータ装置の構成を簡略化して表すブロック図である。この第1実施形態のコンピュータ装置1は、OS(Operating System)処理部2と、BIOS(Basic Input / Output System)処理部3と、CPU(Central Processing Unit)群4とを備えている。
(First embodiment)
FIG. 1 is a block diagram showing a simplified configuration of the computer apparatus according to the first embodiment of the present invention. The
CPU群4は、複数のCPU61,62,・・・,6n(nは2以上の整数)を有している。OS処理部2は、OSに基づいてCPU61,62,・・・,6nを制御する機能を備えている。
The CPU group 4 has a plurality of CPUs 6 1 , 6 2 ,..., 6 n (n is an integer of 2 or more). The
BIOS処理部3は、BIOSに基づいてCPU61,62,・・・,6nを制御する機能を備えている。当該BIOS処理部3は、CPU群4がOS処理部2により制御されているOS処理中に、CPU群4における設定された個数のCPUを、OSに基づいた制御の対象から外れるOS休止状態とする機能を備えている。さらに、BIOS処理部3は、OS休止状態のCPUをBIOSに基づいて制御することによってBIOSに基づいたBIOS処理を割り込み処理として実行する機能を備えている。
The
このようなBIOS処理部3は、例えば、CPU群4を制御するコントローラとしてのCPU8がコンピュータ装置1に備えられている記憶装置10のコンピュータプログラム(プログラム(BIOS))11を読み出して実行することにより実現する。換言すれば、プログラム11には、上記のようなBIOS処理部3の機能を実現する処理手順が表されている。なお、OS処理部2に関しても同様であり、CPU8がプログラム(OS)を実行することにより実現する。
In such a
この第1実施形態のコンピュータ装置1は、CPU群4がOS処理を実行している場合に、CPU群4に含まれる一部のCPUがBIOS処理を実行する構成(機能)を備えている。このため、コンピュータ装置1は、OS処理を中断することなく、BIOS処理を実行できる。これにより、例えばOS処理中に全てのCPU61,62,・・・,6nが間欠的にBIOS処理を実行する場合に比べて、コンピュータ装置1は、OS処理の処理時間が長くなることを抑制しつつ、BIOS処理の処理時間の短縮化を図ることができる。
The
また、この第1実施形態では、OS処理中に割り込み処理としてBIOS処理を実行するCPUは、BIOS処理部3の機能によって、OS休止状態となる。このため、OS処理部2は、OS休止状態(換言すれば、BIOS処理中)のCPUから応答が無くとも異常とは判断しないことから、コンピュータ装置1は、OSパニック(カーネルパニック)等の不都合が発生することが防止できる。
In the first embodiment, the CPU that executes the BIOS process as the interrupt process during the OS process is put into the OS hibernation state by the function of the
(第2実施形態)
以下に、本発明に係る第2実施形態を説明する。
(Second Embodiment)
The second embodiment according to the present invention will be described below.
図2は、第2実施形態に係るコンピュータ装置の構成を簡略化して表すブロック図である。この第2実施形態のコンピュータ装置20は、大別すると、管理装置(コントローラー)21と、CPU(Central Processing Unit)群23と、メモリ24と、記憶装置25とを有している。
FIG. 2 is a block diagram illustrating a simplified configuration of a computer device according to the second embodiment. The
記憶装置25は、例えばハードディスク装置により構成されている。当該記憶装置25は、各種データや、コンピュータ装置20の動作を制御するコンピュータプログラム(例えばOS(Operating System))29が格納されている。
The
CPU群23は、複数のCPU441〜44n(nは2以上の整数)を備えている。メモリ24は、例えばRAM(Random Access Memory)により構成されている。この第2実施形態では、当該メモリ24には、次のような記憶領域が設定されている。つまり、メモリ24は、SMRAM(System Management Random Access Memory)50と、ハンドラ部51と、IDT(Interrupt Descriptor Table (割り込みハンドラテーブル))52と、アドレス部53と、スタック部54とを有している。
The
SMRAM50は、SMI(System management interrupts (システム管理割り込み))という通知が発行された場合に、OS処理を実行しているCPU群23の処理状況(状態状況)を表す情報が格納される記憶領域(状況記憶部)である。
The
ハンドラ部51は、割り込み処理の手順を表すコンピュータプログラムである割り込みハンドラが格納される記憶領域(プログラム記憶部)である。
The
IDT52には、割り込みハンドラのエントリポイントが格納される記憶領域(格納位置記憶部)である。
The
アドレス部53は、OS処理によりメモリ24に書き込まれたデータの格納位置(アドレス)が格納される記憶領域である。
The
スタック部54は、この第2実施形態では、OS処理における次の実行対象の処理のIP(Instruction Pointer)が格納される記憶領域である。
In the second embodiment, the
管理装置21は、CPU群23を制御するコントローラの機能を備えている。当該管理装置21は、CPU(Central Processing Unit)30と、記憶部(不揮発性メモリ)32とを備えている。記憶部32には、BIOS(Basic Input / Output System (コンピュータプログラム))42が格納されている。
The
CPU30は、記憶部32に格納されているBIOS(プログラム)42および記憶装置25に格納されているOSを含むコンピュータプログラム(プログラム)29を読み出し、これらプログラム29,42を実行することにより、CPU群23を制御する機能を備える。
The
すなわち、CPU30は、機能部として、OS処理部34と、BIOS処理部35とを備えている。OS処理部34は、OSに基づいてCPU群23を制御する機能部である。なお、OSに基づいたOS処理には様々な手法があり、ここでは、そのOS処理の詳細な説明は省略する。
That is, the
BIOS処理部35は、BIOSに基づいてCPU群23を制御する機能部である。このBIOS処理部35は、OS処理部34がCPU群23を制御している場合(OS処理中)に、OS処理に割り込んでBIOS処理であるSMM(System Management Mode)処理を実行可能な機能を備えている。なお、BIOS処理には様々な処理があり、ここでは、次に述べる処理以外のBIOS処理に関する詳細な説明は省略する。
The
この第2実施形態では、BIOS処理部35は、機能部として、割り込み手続部37と、テーブル変更部38と、監視部39とを含んでいる。割り込み手続部37は、OS処理に割り込む処理を開始してから、例えば高RAS機能に係るSMM処理を開始するまでの処理を実行する機能を備えている。テーブル変更部38と監視部39は、それぞれ、SMM処理を中断する場合に、SMM処理中のCPUをBIOSによる制御の対象から外しOS処理に戻す処理に関係する機能を備えている。
In the second embodiment, the
以下に、割り込み手続部37とテーブル変更部38と監視部39のそれぞれの動作例を図3〜図6を利用して説明し、この動作の説明を持って割り込み手続部37とテーブル変更部38と監視部39の機能(構成)の説明とする。
Hereinafter, operation examples of the interrupt
図3は、第2実施形態のコンピュータ装置20における管理装置21のBIOS処理部35が実行する割り込み処理のフローチャートである。この図3のフローチャートは、この第2実施形態のコンピュータ装置20が実行するBIOSのコンピュータプログラムの処理手順を表している。
FIG. 3 is a flowchart of interrupt processing executed by the
図4は、OS処理中のCPU群23が割り込み処理としてのSMM処理を開始するために実行する手続処理中のCPUの状態例を模式的に表す図である。図5は、テーブル変更部38の動作例を説明する図である。図6は、メモリ24の格納状態例を模式的に表す図である。
FIG. 4 is a diagram schematically illustrating an example of the state of the CPU during the procedure process executed by the
例えば、CPU群23の全てのCPU441〜44nがOS処理中である場合に、SMM処理を要求する通知を受け取ると、割り込み手続部37は、SMM処理を開始するために次のような手続処理を開始する(図3のステップS101)。
For example, when all the
まず、割り込み手続部37は、全てのCPU441〜44nが、OS処理部34による制御の対象からBIOS処理部35による制御の対象となるようにOS処理部34に指令を発する(ステップS102)。そして、割り込み手続処理部37は、要求されたSMM処理の内容を解析する処理を実行する。これにより、要求されたSMM処理が高RAS機能に関わる処理であることを検知した場合には、割り込み手続処理部37は、LPI(Logical Processor Ldling (論理プロセッサアイドリング))機能を実行する。LPI機能とは、ACPI(Advanced Configuration and Power Interface)規格により定められている機能であり、本来は、CPUを休止(アイドル(Idle))状態に遷移することによって消費電力を削減する機能である。このLPI機能によって休止状態となったCPUは、OS処理部34による制御の対象から外れた状態となる。
First, the interrupt
この第2実施形態では、割り込み手続処理部37は、LPI機能により、CPU群23に含まれる一つのCPUを休止状態とする命令(要求)をOS処理部34に向けて出力する(ステップS103)。ここでは、説明を容易にするために、LPI機能により休止状態(OS休止状態)とするCPUをCPU(A)とも記し、CPU群23におけるそれ以外のCPUをCPU(B)とも記すこととする。
In the second embodiment, the interrupt
その後、割り込み手続部37は、手続処理を再開するタイミングを予約する(ステップS104)。そして、割り込み手続部37は、全てのCPU441〜44nを、BIOS処理部35による制御の対象から外す。これにより、全てのCPU441〜44nは、OS処理部34による制御の対象に戻る。そして、割り込み手続部37は、手続処理を中断する(ステップS105)。つまり、図4に表されているように、時間T1において、CPU群23の全てのCPU(図4に表すCPU(A)とCPU(B))は割り込み手続部37の前記ステップS102の処理(動作)によってOS処理からBIOS処理に遷移する。然る後に、CPU(A)を休止状態とする命令を発した後の図4の時間T2において、CPU群23の全てのCPU(A)とCPU(B)はBIOS処理からOS処理に遷移する(戻る)。ただ、OS処理部34は、CPU群23の一つのCPU(A)を休止状態とする命令をBIOS処理部35から受けているため、図4の時間T3において、CPU(A)をOS休止状態とする。
Thereafter, the interrupt
然る後に、割り込み手続部37は、前記ステップS104にて行った予約動作に基づいた再開タイミングであることを検知すると(ステップS106)、手続処理を再開する。これにより、割り込み手続部37は、休止状態のCPU(A)をも含めたCPU群23の全てのCPU441〜44nが、OS処理部34による制御の対象からBIOS処理部35による制御の対象となるようにOS処理部34に指令を発する(ステップS107、図4の時間T4)。この際、OS処理部34の制御対象から外れる直前のCPU441〜44nの状態を表す情報が、BIOS処理部35の機能によって、SMRAM50に書き込まれる。
Thereafter, when the interrupt
その後、割り込み手続部37は、CPU441〜44nの中からOS処理部34によりOS休止状態となったCPU(A)を特定する(ステップS108)。つまり、割り込み手続部37は、OS処理部34の制御対象から外れる直前にCPU441〜44nが実行していた命令アドレスと、そのレジスタ値との情報をSMRAM50から読み出す。そして、割り込み手続部37は、その読み出した情報に基づいて、実行していた命令が休止命令であり、かつ、その際のパラメータ(レジスタ値)がLPI機能による指示であるCPUを特定することにより、CPU(A)を特定する。
Thereafter, the interrupt
然る後に、割り込み手続部37は、その特定したCPU(A)のみが、要求されているSMM処理を実行するように、IPI(Inter Processor Interrupt (プロセッサ間割り込み))をCPU(A)に通知する(ステップS109)。引き続いて、割り込み手続部37は、手続処理を中断する(ステップS110)。これにより、CPU(A)を含むCPU群23の全てのCPU441〜44nが、BIOS処理部35の制御対象から外れ、当該BIOS管理部35の制御対象となる前の状態に復帰する。つまり、CPU(A)はOS休止状態となり、CPU群23のそれ以外のCPU(B)はOS処理部34の制御対象となっている状態(OS処理中)となる(図4の時間T5)。
Thereafter, the interrupt
CPU(A)は、そのようにOS休止状態となるが、IPIの通知を受けているために、BIOS処理部35が制御する状態(BIOS処理中)に戻る(図4の時間T6)。BIOS処理部35は、このようにCPU(A)が制御対象に戻った(BIOS処理に遷移した)ことを検知すると(ステップS111)、当該CPU(A)が高RAS機能に関係するSMM処理を開始するように指令する(ステップS112)。
As described above, the CPU (A) is in the OS hibernation state, but returns to the state controlled by the BIOS processing unit 35 (in the BIOS processing) because of the IPI notification (time T6 in FIG. 4). When the
この第2実施形態では、上記のように、OS処理中のCPU群23が割り込み処理としてSMM処理を実行する場合には、CPU群23におけるCPU441〜44nのうちの一つのCPU(CPU(A))がSMM処理を実行する。この場合、CPU(A)は、OS処理部34から見ると休止状態であり、OS処理34によって管理されない。このため、この第2実施形態のコンピュータ装置20は、次のような問題を防止できる。つまり、その問題とは、CPU(A)は正常であるのにも拘わらず、当該CPU(A)からOS処理部34への応答が無いためにCPU(A)が停止してしまったとOS処理部34が判断し、例えばOSパニック(カーネルパニック)を起こすという問題である。この第2実施形態のコンピュータ装置20は、そのような問題を防止しつつ、CPU(A)によりSMM処理を実行し、かつ、それと共にCPU(B)によりOS処理を実行する。これにより、コンピュータ装置20は、SMM処理の処理時間の短縮、および、OS処理の遅延も防止できるという効果を得ることができる。
In the second embodiment, as described above, when the
ところで、前記の如く、SMM処理中のCPU(A)は、OS処理部34から見ると休止状態(OS休止状態)である。CPU(A)は、OS処理部34の処理状況に応じてOS休止状態からOS処理部34の制御対象に復帰することがある。テーブル変更部38と監視部39は、そのCPU(A)の復帰を円滑にする処理に関わる機能を有する。
By the way, as described above, the CPU (A) during the SMM process is in a dormant state (OS dormant state) when viewed from the
すなわち、テーブル変更部38は、OS処理部34が割り込み処理(OS割り込みハンドラ)を実行することによる復帰処理に関わる。つまり、テーブル変更部38は、そのような復帰処理に備えて、まず、BIOS処理部35がCPU(A)によるSMM処理を開始する際に(図3のステップS112)、メモリ24のIDTを書き換える。具体例を挙げると、図5の例では、ハンドラ部51において、OS処理における割り込みハンドラ(OS割り込みハンドラ)の各エントリポイントは、0x100、0x300、0x500である。また、BIOS処理における割り込みハンドラ(BIOS処理割り込みハンドラ)の各エントリポイントは、0x200、0x400、0x600である。テーブル変更部38は、図5(a)のようなIDT52におけるOS割り込みハンドラのエントリポイント(0x100、0x300、0x500)を、図5(b)のようにBIOS割り込みハンドラのエントリポイント(0x200、0x400、0x600)に書き換える(変更する)。
In other words, the
このようにIDT52を書き換えることにより、OS処理部34がCPU(A)を制御対象とする復帰タイミングであるOS割り込みハンドラの実行時に、CPU(A)が次のように動作することになる。つまり、OS処理部34はOS割り込みハンドラを実行するために、IDT52のエントリポイントに基づいて割り込みハンドラを実行しようとするが、そのエントリポイントは、書き換えられている。このため、OS割り込みハンドラではなく、BIOS割り込みハンドラが実行される。つまり、BIOS処理部35は、図3のステップS113における判断動作によって、CPU(A)がOS処理部34の制御対象に復帰するタイミングであると判断した場合には、CPU(A)の復帰処理(BIOS割り込みハンドラ)を実行する(ステップS116)。
By rewriting the
この復帰処理(BIOS割り込みハンドラ)を開始する際には、図6(a)のように、IDT52にはそのBIOS割り込みハンドラのエントリポイントの0x200が書き込まれている。また、SMRAM50におけるRIP(Relative Instruction-Pointer)レジスタには、CPU(A)がOS処理部34の制御対象から外れる直前にCPU(A)に向けて出力されたIPである0x1000が格納されている。
When starting the return process (BIOS interrupt handler), as shown in FIG. 6A, the entry point 0x200 of the BIOS interrupt handler is written in the
復帰処理では、BIOS処理部35は、CPU(A)が実行しているSMM処理の進行状況を記憶する。そして、BIOS処理部35は、IDT52に格納されている当該BIOS割り込みハンドラのエントリポイント(0x200)を、図6(c)のように元のOS割り込みハンドラのエントリポイント(0x100)に書き換える。また、BIOS処理部35は、SMRAM50におけるRIPレジスタに書き込まれている休止命令のIPである0x1000を、図6(c)のようにOS割り込みハンドラのエントリポイントである0x100に変更する。その後、BIOS処理部35は、SMRAM50におけるRSP(Return Stack Pointer(スタックポイント))レジスタに格納されているスタック部54の格納位置に、IP(0x1003)を格納する。このIP(0x1003)は、CPU(A)が休止命令の次に実行する処理内容(命令)に対応するIPである。
In the return process, the
その後、BIOS処理部35は、CPU(A)を制御対象から外すことにより、図3のステップS117に表されるようにSMM処理を中断する。これにより、CPU(A)は、OS処理部34の制御対象となる。OS処理部34は、SMRAM50におけるRIPレジスタに格納されている実行対象のエントリポイント(0x100)のOS割り込みハンドラを実行する。この状態において、RSPレジスタの格納情報に対応するスタック部54の格納位置には、休止命令の次の命令のIPである0x1003が格納されている。このため、CPU(A)は、そのOS割り込みハンドラの終了後に、そのIP(0x1003)に基づいてOS処理に復帰できる。
Thereafter, the
これにより、CPU群23の全てのCPU441〜44nはOS処理を実行している状態となる。このような状態である時に、SMM処理を要求する通知を管理装置21が受け取ると、図3の前記ステップS101以降の動作を繰り返す。
As a result, all the
上記例では、OS処理部34がOS割り込みハンドラを実行することを契機として、CPU(A)がOS処理部34の制御対象に復帰する場合の処理例を述べている。さらに、CPU(A)は、アドレス部53における指定されたアドレスにデータがOS処理部34により書き込まれた場合を契機として、OS処理部34の制御対象に復帰してもよい。この場合には、BIOS処理部35は、次のような処理を実行する。
In the above example, a processing example in which the CPU (A) returns to the control target of the
例えば、前記ステップS112において、BIOS処理部35は、CPU(A)によるSMM処理を開始する前に、SMRAM50を参照することにより、CPU(A)がOS処理部34の制御対象から外れる直前のレジスタ値を取得する。そして、BIOS処理部35は、そのレジスタ値に基づいて、CPU(A)がOS処理部の制御対象に復帰する契機となるアドレス部53のアドレス(以下、復帰契機アドレスと記す)を取得する。
For example, in step S112, the
その後、BIOS処理部35は、CPU(A)によるSMM処理を開始する。このSMM処理中に、BIOS処理部35は、メモリ24に対するポーリング機能を実行する。つまり、BIOS処理部35は、SMM処理中に、メモリ24における書き込み状態を一定周期でもって監視(ポーリング)する。
Thereafter, the
そして、BIOS処理部35は、メモリ24における復帰契機アドレスがOS処理部34によって変更されたことを検知した場合には、図3のステップS113の判断動作によって、CPU(A)がOS処理部34の制御対象に復帰するタイミングであると判断する。そして、BIOS処理部35は、ステップS116における復帰処理として、CPU(A)によるSMM処理の進行状況を記憶し、CPU(A)を制御対象から外す。これにより、CPU(A)は、OS処理部34の制御対象に復帰し、BIOS処理部35は、SMM処理を中断する(図3のステップS117)。
Then, when the
ところで、OS処理部34が復帰契機アドレスに情報を書き込むことを指令してからCPU(A)がOS処理部34の制御対象に復帰するまでに要する最大レイテンシは、CPUの性能による休止状態からの復帰時間にポーリング周期を加算した時間である。当該最大レイテンシは予め定まることから、BIOS処理部35は、その最大レイテンシの情報を予め(例えばOSの立ち上げ時に)OS処理部34に通知しておく。OS処理部34がCPU(A)の復帰許容時間として設定する時間を最大レイテンシ以上に設定することにより、CPU(A)が正常に復帰しようとしているのにも拘わらず、OS処理部34がCPU(A)の復帰が遅いと判断してしまうことを防止できる。
By the way, the maximum latency required for the CPU (A) to return to the control target of the
BIOS処理部35は、SMM処理中に、図3におけるステップS113において、OS処理部34の処理に起因したCPU(A)の復帰命令を受けていないと判断した場合には、ステップS114において、SMM処理が完了したか否かを判断する。そして、BIOS処理部35は、SMM処理は完了していないと判断した場合には、CPU(A)を利用したSMM処理を継続し(ステップS115)、ステップS113以降の動作を繰り返す。BIOS処理部35は、ステップS114において、SMM処理が完了したと判断した場合には、SMM処理を終了し、CPU(A)を制御対象から外す。これにより、CPU(A)は、OS処理部34の制御対象に復帰し、OS処理を開始する。
If the
この第2実施形態のコンピュータ装置20は、上記のような構成を備えているので、OS処理中にBIOSによる割り込み処理を実行する場合に、OS処理に要する時間が長くなることを防止しつつ、BIOS処理に要する時間の短縮化を図ることができる。
Since the
つまり、この第2実施形態のコンピュータ装置20は、OS処理中のCPU群23に含まれる一つのCPUがSMM処理を実行する機能を備えているから、OS処理を継続しながらSMM処理を実行できる。このため、コンピュータ装置20は、OS処理を中断することなくSMM処理を実行するために、OS処理の処理時間が長くなるという問題を抑制できる。また、コンピュータ装置20は、OS処理中にSMM処理を実行する前に、SMM処理を実行するCPUをOS休止状態(OS処理部34が見た場合に休止状態に見える状態)とする処理を実行するので、そのSMM処理中のCPUがOS処理部34に応答しないことに因る不具合の発生を回避できる。
That is, the
さらに、この第2実施形態のコンピュータ装置20は、テーブル変更部38および監視部39の動作によって、CPUをOS処理部34の制御対象にスムーズに復帰できる。
Furthermore, the
(その他の実施形態)
なお、この発明は第1や第2の実施形態に限定されず、様々な実施の形態を採り得る。例えば、第2実施形態では、コンピュータ装置20は、CPU群23に含まれる一つのCPUがOS処理中に割り込み処理としてのBIOS処理を実行する機能を備えている。これに対して、OS処理中に割り込み処理としてのBIOS処理を実行するCPUの個数は複数であってもよい。
(Other embodiments)
The present invention is not limited to the first and second embodiments, and various embodiments can be adopted. For example, in the second embodiment, the
また、第2実施形態では、SMM処理中のCPU(A)がOS処理に復帰する契機として、OS処理部34がOS割り込みハンドラを実行する場合と、復帰契機アドレスにデータを書き込む場合とを例に挙げている。しかし、CPU(A)がOS処理に復帰する契機条件は、それらに限定されない。例えば、その復帰の契機条件は、上記2つの場合(条件)の何れか一方であってもよい。また、復帰の契機条件は、上記2つの場合(条件)にさらに別の条件をも含まれていてもよい。
Further, in the second embodiment, as an opportunity for the CPU (A) in the SMM process to return to the OS process, the case where the
1,20 コンピュータ装置
2,34 OS処理部
3,35 BIOS処理部
4,23 CPU群
1,20
Claims (8)
OS(Operating System)に基づいて前記CPUを制御するOS処理部と、
BIOS(Basic Input / Output System)に基づいて前記CPUを制御するBIOS処理部と
を備え、
前記BIOS処理部は、前記CPU群が前記OS処理部により制御されているOS処理中に、前記CPU群における設定された個数の前記CPUを、前記OSに基づいた制御の対象から外れるOS休止状態とし、当該OS休止状態の前記CPUを前記BIOSに基づいて制御することによって前記BIOSに基づいたBIOS処理を割り込み処理として実行する構成を備えているコンピュータ装置。 A CPU group including a plurality of CPUs (Central Processing Units);
An OS processing unit for controlling the CPU based on an OS (Operating System);
A BIOS processing unit for controlling the CPU based on BIOS (Basic Input / Output System);
The BIOS processing unit is in an OS hibernation state in which a set number of CPUs in the CPU group are excluded from control targets based on the OS during the OS process in which the CPU group is controlled by the OS processing unit. And a computer apparatus configured to execute the BIOS process based on the BIOS as an interrupt process by controlling the CPU in the OS dormant state based on the BIOS.
前記BIOS処理部は、前記OS処理中に割り込み処理として前記BIOS処理を実行する場合に、前記設定された個数の前記CPUを前記OS休止状態とする休止命令を前記OS処理部に向けて出力する処理と、前記休止命令を受けた前記OS処理部により前記OS休止状態となった前記CPUを、前記状況記憶部に格納されている情報を利用して特定する処理とを実行し、特定された前記OS休止状態の前記CPUを利用して、前記BIOS処理を実行する請求項1記載のコンピュータ装置。 A situation storage unit for storing information representing a processing status of the OS processing unit;
When executing the BIOS process as an interrupt process during the OS process, the BIOS processing unit outputs a sleep command for setting the set number of CPUs to the OS sleep state to the OS processing unit. The processing and the processing for specifying the CPU in the OS hibernation state by using the information stored in the status storage unit by the OS processing unit that has received the hibernation instruction, The computer apparatus according to claim 1, wherein the BIOS processing is executed using the CPU in the OS hibernation state.
前記BIOS処理部は、BIOS処理中に、前記格納位置記憶部において、前記OS休止状態の前記CPUが前記OS処理部の制御対象に復帰するタイミングに関わるOS処理の規定のコンピュータプログラムの格納位置の情報を前記OS休止状態の前記CPUに対する復帰処理のコンピュータプログラムの格納位置の情報に変更し、前記OS処理の前記規定のコンピュータプログラムに基づいた処理が実行される前に、前記復帰処理を実行する構成をさらに備えている請求項1又は請求項2記載のコンピュータ装置。 A program storage unit for storing the computer program; and a storage location storage unit for storing information on the storage location of the computer program to be executed;
The BIOS processing unit stores, in the storage location storage unit, a storage location of a computer program specified in the OS processing related to the timing at which the CPU in the OS hibernation state returns to the control target of the OS processing unit in the storage location storage unit. The information is changed to information on the storage location of the computer program for the return process for the CPU in the OS hibernation state, and the return process is executed before the process based on the prescribed computer program for the OS process is executed. The computer apparatus according to claim 1, further comprising a configuration.
前記CPU群が前記OSに基づいて制御されているOS処理中に、前記CPU群における設定された個数の前記CPUを、前記OSに基づいた制御の対象から外れるOS休止状態とし、
当該OS休止状態の前記CPUを前記BIOSに基づいて制御することによって前記BIOSに基づいたBIOS処理を割り込み処理として実行する
割り込み制御方法。 A CPU group including a plurality of CPUs (Central Processing Units) is provided, and has a function of controlling the CPU based on an OS (Operating System) and a function of controlling the CPU based on a BIOS (Basic Input / Output System). Computer equipment
During the OS processing in which the CPU group is controlled based on the OS, a set number of the CPUs in the CPU group are put into an OS hibernation state that is excluded from the control target based on the OS,
An interrupt control method for executing a BIOS process based on the BIOS as an interrupt process by controlling the CPU in the OS dormant state based on the BIOS.
前記CPU群が前記OSに基づいて制御されているOS処理中に、前記CPU群における設定された個数の前記CPUを、前記OSに基づいた制御の対象から外れるOS休止状態とする処理と、
当該OS休止状態の前記CPUを前記BIOSに基づいて制御することによって前記BIOSに基づいたBIOS処理を割り込み処理として実行する処理と
を実行させる処理手順を表すコンピュータプログラム。 A CPU group including a plurality of CPUs (Central Processing Units) is provided, and has a function of controlling the CPU based on an OS (Operating System) and a function of controlling the CPU based on a BIOS (Basic Input / Output System). Computer equipment
A process of setting a set number of CPUs in the CPU group to an OS hibernation state that is excluded from a control target based on the OS during the OS process in which the CPU group is controlled based on the OS;
The computer program showing the process sequence which performs the process which performs the BIOS process based on the said BIOS as an interruption process by controlling the said CPU of the said OS dormant state based on the said BIOS.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013196637A JP2015064638A (en) | 2013-09-24 | 2013-09-24 | Computer device, interruption control method and computer program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013196637A JP2015064638A (en) | 2013-09-24 | 2013-09-24 | Computer device, interruption control method and computer program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2015064638A true JP2015064638A (en) | 2015-04-09 |
Family
ID=52832489
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2013196637A Pending JP2015064638A (en) | 2013-09-24 | 2013-09-24 | Computer device, interruption control method and computer program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2015064638A (en) |
-
2013
- 2013-09-24 JP JP2013196637A patent/JP2015064638A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10649935B2 (en) | Deferred inter-processor interrupts | |
| KR101635778B1 (en) | Providing state storage in a processor for system management mode | |
| US8726055B2 (en) | Multi-core power management | |
| US7992042B2 (en) | Debug support device, and program for directing computer to perform debugging method | |
| US20060085794A1 (en) | Information processing system, information processing method, and program | |
| US10802998B2 (en) | Technologies for processor core soft-offlining | |
| CN105359101B (en) | System Management Interrupt Handling for Multicore Processors | |
| US20110197193A1 (en) | Device and method for controlling communication between bios and bmc | |
| WO2008101386A1 (en) | Method of recovering single core exception in multi-core system | |
| EP2972826B1 (en) | Multi-core binary translation task processing | |
| CN103473135A (en) | Processing method for spinlock LHP (Lock-Holder Preemption) phenomenon under virtual environment | |
| JP2013225208A (en) | Information processing apparatus, information processing method and program | |
| CN108241522B (en) | Sleep state switching method and device in virtualization environment and electronic equipment | |
| JP2011044110A (en) | Software program execution device, software program execution method and program | |
| JP4992740B2 (en) | Multiprocessor system, failure detection method, and failure detection program | |
| US20180348840A1 (en) | Predictive virtual machine halt | |
| US7797473B2 (en) | System for executing system management interrupts and methods thereof | |
| CN105474174B (en) | Control time-intensive instructions | |
| JP4253796B2 (en) | Computer and control method | |
| JP5678347B2 (en) | IT system configuration method, computer program thereof, and IT system | |
| WO2018206793A1 (en) | Multicore processing system | |
| US20240086220A1 (en) | Delaying interrupts for virtual machines | |
| WO2010137092A1 (en) | Multi-operating system control method and processor system | |
| JP2015064638A (en) | Computer device, interruption control method and computer program | |
| JP4878050B2 (en) | Computer and control method |