JPS622327A - Stack-over prevention and controlling system - Google Patents

Stack-over prevention and controlling system

Info

Publication number
JPS622327A
JPS622327A JP14162685A JP14162685A JPS622327A JP S622327 A JPS622327 A JP S622327A JP 14162685 A JP14162685 A JP 14162685A JP 14162685 A JP14162685 A JP 14162685A JP S622327 A JPS622327 A JP S622327A
Authority
JP
Japan
Prior art keywords
nmi
area
stack
interruption
address
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
JP14162685A
Other languages
Japanese (ja)
Inventor
Hideo Takahashi
秀雄 高橋
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP14162685A priority Critical patent/JPS622327A/en
Publication of JPS622327A publication Critical patent/JPS622327A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To prevent the stack-over, and to improve the reliability of a system by checking an idle area of a stack area, in case an NMI is generated, stacking the NMI in the idle area only when it exists, and executing a prescribed processing. CONSTITUTION:When an interruption 2 is generated from the outside in the course of executing a program processing by a CPU 1, an interruption control part 8 regards it as an NMI interruption, if a flag is on, by referring to an NMI (NON.MASKABLE.INTERRUPT) status register 3, and checks an idle area B of a stack area 5. When the idle area is not enoug, an NMI inhibiting flag is turned on to an NMI mask register 7 and the subsequent NMI interruption is inhibited. When the idle area is enough, the NMI is released by turning off the flag, a regular NMI processing is executed, and the use area is released.

Description

【発明の詳細な説明】 〔概要〕 本発明は、NMI  (NON  MASKABLEI
NTERRUPT)発生時にスタックの空き領域をチェ
ックし、所定のアドレス以上になったらNMIを禁止し
スタックオーバを防止することによ、リシステムの信頼
性の向上を図る方式である。
[Detailed Description of the Invention] [Summary] The present invention is based on NMI (NON MASKABLEI).
This method aims to improve the reliability of the resystem by checking the free space on the stack when an NMI (NTERRUPT) occurs, and inhibiting NMI when the address exceeds a predetermined address to prevent stack overflow.

〔産業上の利用分野〕[Industrial application field]

本発明は、情報処理分野における特にスタック方式を用
いた情報処理システムに係り、NMI発生時に、スタッ
クの空き領域をチェックし、所定のアドレス値以上にな
ったときは、該NMIを禁止し、他方所定のアドレス値
以下の場合は、該NMIを有効とするよう制御する方式
に関する。
The present invention relates to an information processing system using a stack method in the information processing field, in which when an NMI occurs, the free space of the stack is checked, and when the address value exceeds a predetermined address value, the NMI is prohibited, and the other The present invention relates to a method of controlling the NMI to be valid when the address value is less than or equal to a predetermined address value.

〔従来の技術〕[Conventional technology]

従来は、NMI発生時呼び出し元に復帰するまでに再び
NMIが発生した場合も、正常作に処理できるように充
分なスタック領域を確保する方式〔発明が解決しようと
する問題点〕 該従来方式では、先のNMIが呼び出し元に復帰する間
に次のNMIが発生するとスタックが除々に使用されて
他のユーザのスタックの領域を破壊する場合が生ずると
いう欠点があった。
In the conventional method, when an NMI occurs, even if an NMI occurs again before returning to the caller, a sufficient stack area is secured so that normal operation can be processed. [Problem to be solved by the invention] In this conventional method, However, if the next NMI occurs while the previous NMI returns to the caller, the stack may be gradually used and the stack area of another user may be destroyed.

本発明は前記欠点に鑑みてなされたもので、スタックオ
ーバを防止しシステムの信頼度の向上を図ることを目的
とする。
The present invention has been made in view of the above-mentioned drawbacks, and an object of the present invention is to prevent stackovers and improve system reliability.

〔問題点を解決するだめの手段〕[Failure to solve the problem]

該目的は、NMI  (NON  MASKABLEI
NTERRUPT)が発生した際に、スタックエリア5
の空き領域Bをチェックし、十分空きタックオーバ防止
を行なうことを特徴とするスタックオーバ防止制御方式
により達成される。
The purpose is NMI (NON MASKABLEI).
NTERRUPT) occurs, stack area 5
This is achieved by a stackover prevention control method which is characterized in that it checks the free area B of the stack and sufficiently prevents a stackover.

〔作用〕[Effect]

本発明はNMIが発生した際のスタックにおいて、咳N
MI発生時にスタックエリア5の空き領域Bをチェック
することにより、所定のアドレスX以上になった時(空
き領域が十分でない時)はNMIマスクレジスタのフラ
グをONにするとともに該NMIをスタックせず、空き
領域が十分ある時は該NMI苓スタスクレジスタ書込み
を止めて、該NMIを有効としてスタックし処理するこ
とによりスタックエリアの予定外の破壊を防ぎ信頼性の
向上を図るものである。
The present invention provides cough NMI in the stack when NMI occurs.
By checking the free area B of stack area 5 when an MI occurs, when the address reaches a predetermined address When there is sufficient free space, writing to the NMI task register is stopped and the NMI is stacked and processed as valid, thereby preventing unplanned destruction of the stack area and improving reliability.

〔実施例〕〔Example〕

以下図面を参照しつつ本発明の詳細な説明する。 The present invention will be described in detail below with reference to the drawings.

第1図は本発明の一実施例を示すシステム構成図である
FIG. 1 is a system configuration diagram showing an embodiment of the present invention.

図において、1は中央処理装置、2は割込み信号、3は
NMIステータスレジスタ(ハードレジスタ)、4は空
き領域制御テーブル、5はスタックエリア、6はL/ン
グスA (C領域のアドレス間隔)、Bは空き領域、C
は1回のNMIスタックされる領域、Xは所定アドレス
(スタックできる最大のアドレス)、Yはアドレス(ア
゛ドレスX−レングスA) 、Zはスタックされようと
しているアドレスである、7はNMIマスクレジスタ、
8は割込み制御部である。
In the figure, 1 is the central processing unit, 2 is the interrupt signal, 3 is the NMI status register (hard register), 4 is the free area control table, 5 is the stack area, 6 is L/ungs A (address interval of the C area), B is free space, C
is the area to be stacked by one NMI, X is the predetermined address (maximum address that can be stacked), Y is the address (address X-length A), Z is the address to be stacked, 7 is the NMI mask register,
8 is an interrupt control section.

第2図は本発明の一実施例を示す割込み制御部8の処理
フローチャートである。
FIG. 2 is a processing flowchart of the interrupt control section 8 showing one embodiment of the present invention.

図において20はスタック空き領域チェック部、21は
NMI処理部である。
In the figure, 20 is a stack free area checking section, and 21 is an NMI processing section.

中央処理装置1であるプログラム処理を実行中、図示し
ない外部の装置(例えば入出力制御装置)からの割込み
2が割込制御部8に受け付けられると該割込制御部8は
NMIステータスレジスタ3を参照してNMI割込みを
示すフラグが立っていたらNMI割込みと見なし、スタ
ック領域チェック部20でスタック領域のチェックを行
なう。
While the central processing unit 1 is executing a program, when an interrupt 2 from an external device (for example, an input/output control device) (not shown) is accepted by the interrupt control unit 8, the interrupt control unit 8 registers the NMI status register 3. If a flag indicating an NMI interrupt is set, it is regarded as an NMI interrupt, and the stack area checking unit 20 checks the stack area.

例えば空き領域制御テーブル4から1回目のNMIでス
タックされる領域Cの長さレングスAとスタックできる
最大のアドレスX(所定アドレス)で、アドレスX−レ
ングスA=アドレスYを計算し、該アドレスYから所定
アドレスXまでの領域をスタック空き領域Bとして、ア
ドレスYと現在スタックされようとしているアドレスZ
を比較して、Z>Yなら空き領域が充分でないため、N
M■マスクレジスタ7にN M、I禁止フラグをONに
して以降のNMIの割込みを禁止し、空き領域が確保さ
れるまで空き領域を行なう。
For example, from the free area control table 4, calculate address The area from to a predetermined address
If Z > Y, there is not enough free space, so N
The NM, I prohibition flag in the M■ mask register 7 is turned on to prohibit subsequent NMI interrupts, and the free area is cleared until the free area is secured.

他方、Z<Yならば空き領域が充分有るので8Mlマス
クレジスタ7をチェックし、NMI禁止フラグがONな
らば該フラグをOFFにしてNMI解除し通常のNMI
処理21を実行し使用領域を解除する。
On the other hand, if Z<Y, there is enough free space, so check the 8Ml mask register 7, and if the NMI prohibition flag is ON, turn it OFF to cancel the NMI and return to normal NMI.
Process 21 is executed to release the used area.

ここで通常のNMI処理21とは、NMIが発生した時
、中央処理装置内の全レジスタ群をスタック内に退避す
る処理をいう。
Here, the normal NMI processing 21 refers to processing for saving all register groups in the central processing unit into the stack when an NMI occurs.

〔発明の効果〕〔Effect of the invention〕

以上説明した様に、本発明によれば、スタックエリアに
レジスタ退避を行なう前に、空き領域のチェックを行な
っているので、他のユーザ等のスタックエリアを破壊す
ることがなくなり、スタック処理の信頼度の向上が図れ
るという効果がある。
As explained above, according to the present invention, free space is checked before registers are saved to the stack area, so the stack area of other users etc. is not destroyed, and the stack processing is reliable. This has the effect of improving performance.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の一実施例を示すシステム構成図である
。 第2図は本発明の一実施例を示す割込み制御部8の処理
フローチャートである。 記号の説明、1は中央処理装置、2は割込み信号、3は
NMIステータスレジスタ(ハードレジスタ)、4は空
き領域制御テーブル、5はスタックエリア、6はレング
スA (C領域のアドレス間隔)、Bは空き領域、Cは
1回のNMIでスタックされる領域、Xは所定アドレス
(スタックできる最大のアドレス)、Yはアドレス(ア
ドレスX−レングスA) 、Zはスタックされようとし
ているアドレスである、7はNMIマスクレジスタ、8
は割込み制御部。 ′l 纂 1 巳
FIG. 1 is a system configuration diagram showing an embodiment of the present invention. FIG. 2 is a processing flowchart of the interrupt control section 8 showing one embodiment of the present invention. Explanation of symbols: 1 is the central processing unit, 2 is the interrupt signal, 3 is the NMI status register (hard register), 4 is the free area control table, 5 is the stack area, 6 is the length A (address interval of area C), B is a free area, C is an area to be stacked with one NMI, X is a predetermined address (maximum address that can be stacked), Y is an address (address X-length A), Z is an address to be stacked, 7 is the NMI mask register, 8
is the interrupt control section. 'l 纂 1 巳

Claims (1)

【特許請求の範囲】[Claims] 中央処理装置でプログラムを処理する情報処理システム
において、NMI(NON MASKABLE INT
ERRUPT)割込みを受け付け、スタックエリア(5
)の空き領域をチェックし、十分空き領域がある場合の
み、該空き領域に該NMIをスタックする割込み制御手
段を設けたことを特徴とするスタックオーバ防止制御方
式。
In an information processing system that processes programs in a central processing unit, NMI (NON MASKABLE INT)
ERRUPT) interrupt is accepted and the stack area (5
), and only when there is sufficient free space, interrupt control means stacks the NMI in the free space.
JP14162685A 1985-06-28 1985-06-28 Stack-over prevention and controlling system Pending JPS622327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14162685A JPS622327A (en) 1985-06-28 1985-06-28 Stack-over prevention and controlling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14162685A JPS622327A (en) 1985-06-28 1985-06-28 Stack-over prevention and controlling system

Publications (1)

Publication Number Publication Date
JPS622327A true JPS622327A (en) 1987-01-08

Family

ID=15296412

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14162685A Pending JPS622327A (en) 1985-06-28 1985-06-28 Stack-over prevention and controlling system

Country Status (1)

Country Link
JP (1) JPS622327A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54150050A (en) * 1978-05-18 1979-11-24 Toshiba Corp Interruption control circuit
JPS5762444A (en) * 1980-10-03 1982-04-15 Mitsubishi Electric Corp Data processor
JPS6057439A (en) * 1983-09-08 1985-04-03 Matsushita Electric Ind Co Ltd Stack overflow detector

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54150050A (en) * 1978-05-18 1979-11-24 Toshiba Corp Interruption control circuit
JPS5762444A (en) * 1980-10-03 1982-04-15 Mitsubishi Electric Corp Data processor
JPS6057439A (en) * 1983-09-08 1985-04-03 Matsushita Electric Ind Co Ltd Stack overflow detector

Similar Documents

Publication Publication Date Title
JP3600095B2 (en) Interrupt management device and interrupt management method
EP0150521A3 (en) Data processing system with improved interrupt handling
JPH05108218A (en) Computer system
KR960035262A (en) Method and apparatus for selective control of interrupt wait in data processing system
EP0283581B1 (en) Computer system with mode conversion of computer commands
JPS622327A (en) Stack-over prevention and controlling system
WO2002061582A3 (en) Event handling
JPH03175537A (en) Error controller for debugging microprocessor
JPS5920053A (en) Microcomputer system
JPH07311686A (en) Computer system and method for generation and processing of system management interrupt in it
JPH06251171A (en) Microcomputer with non-maskable interrupt function
JPH01197843A (en) Microcomputer
JPH02121045A (en) Microprocessor with access protecting function
JPH04346134A (en) Interruption processor
JPS61216059A (en) System for protecting storage data
JPS621042A (en) Electronic computer
JPS60114959A (en) Control method of data storage device
JPS62120544A (en) Information processor
JPH01233545A (en) Interruption factor controller
JPS6220013A (en) Disconnecting device for power supply of microcomputer applied equipment
JPS6284339A (en) Microcomputer
JPS60138655A (en) Protecting method of nonvolatile memory
JPS6359649A (en) Communication system between processors
JPH0581079A (en) Software runaway preventing system
JPH0378658B2 (en)