CN105607891A - Processor resource use decoupling method based on virtual interrupt - Google Patents

Processor resource use decoupling method based on virtual interrupt Download PDF

Info

Publication number
CN105607891A
CN105607891A CN201410650080.5A CN201410650080A CN105607891A CN 105607891 A CN105607891 A CN 105607891A CN 201410650080 A CN201410650080 A CN 201410650080A CN 105607891 A CN105607891 A CN 105607891A
Authority
CN
China
Prior art keywords
module
processing
interrupt
interruption
processing module
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
CN201410650080.5A
Other languages
Chinese (zh)
Inventor
颜纪讯
丛日朝
朱立平
鹿雪玲
淡图南
徐建军
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.)
No 618 Research Institute of China Aviation Industry
Original Assignee
No 618 Research Institute of China Aviation Industry
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 No 618 Research Institute of China Aviation Industry filed Critical No 618 Research Institute of China Aviation Industry
Priority to CN201410650080.5A priority Critical patent/CN105607891A/en
Publication of CN105607891A publication Critical patent/CN105607891A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a processor resource use decoupling method based on virtual interrupt. The method is characterized in that one functional module is selected as a basic processing module when exceptions and interrupt happen, the rest of functional modules are slave processing modules, and the following steps are successively finished after the context protection work of a normal interrupt processing inlet of the basic processing module is finished.

Description

A kind of processor resource based on virtual interruption uses the lotus root method of separating
Technical field
The present invention relates to a kind of two standalone feature modules simply method of effective integration relevant to processor abnormality processing.
Background technology
The processing of interrupting, being that processor is the very crucial function that embedded application software provides, is the necessary means that realizes a series of functions such as Embedded Application realization debugging, peripheral hardware transmitting-receiving, periodic duty, can say, effectively do not interrupt processing, just there is no powerful embedded program. And the processing mode of interrupting is directly subject to again that processor is abnormal, the design of interrupt function.
The mode of interruption is provided according to processor, and processor relation abnormal and interrupt control unit is divided, substantially can be divided into two classes, one class is that the abnormal and interrupt control unit of processor belongs to relation in parallel, under this mode, the different generations of interrupting can directly trigger processor and move to different interrupt service routine entrances, and the interruption of homology, on software is processed, is not incoherent completely. Make the X 86 processor that comprised in this way. Another kind of is that the abnormal and interrupt control unit of processor belongs to series relationship, first the interruption that different interrupt source produces triggers processor and in same abnormality processing entrance, carries out basic context processing, search again afterwards interrupt control unit state, determine concrete exterior interrupt, then enter into relevant interruption processing. Make in this way comprise PowerPC series processors. Under this mode, the different processing of interrupting are at least, in the entrance and exit link of whole abnormality processing, to be coupled.
Generally, first the interruption processing procedure of this series system, should design a unified Exception Handling Framework, then realize respectively on this basis the interruption processing of different interrupt sources. But, in real work, likely run into some problems, cause this method to be difficult to realize. For example, the processing of multiple interrupt sources is independently write respectively, moves, is verified after a period of time, need in certain system, the processing of disparate modules be integrated again. Some modules, for example task handover module, fault processing module, and debugging module etc., the function treatment that it is inner, can depend in entrance processing, the position that processor register is preserved and order, the interruption context preservation mode before namely functional module operation. If the mode that during the entrance of any one module is processed, context is preserved is modified, to adapt to another module, all may cause this inside modules function again to write, and this is difficult to the successful experience before making to inherit, and need to again expend time in module is carried out to extensive work. In more extreme situation, module is black box state, and its inside is realized invisible and cannot be revised, and how user cannot prediction function inside modules use the interruption context of preserving in advance to carry out work. In this case, use the method for unified Exception Handling Framework more cannot realize the integrated of disparate modules.
With this understanding, a kind of method need to be proposed, can be in integrated process, do not affect the front needed context environmental state of resume module separately, thereby by non-coupling the integrating of interruption processing module milli of different interrupt sources, and do not affect the normal work of different disposal module.
Summary of the invention
The invention provides a kind of processor resource based on virtual interruption and use the lotus root method of separating; it is characterized in that: in the time occurring extremely, interrupt; select a functional module as basic handling module; all the other functional modules are from processing module; after the normal interruption processing entrance contextual protection work of basic handling module completes, complete successively following steps:
Step 1): interrupt function processing module is selected, or after selecting, this interruption should be processed by basic handling module, do not need to carry out the structure of virtual interrupt spot, directly enter in the function treatment of basic handling module, if the result obtaining indicates and currently should, by from processing module processing, enter step 2);
Step 2): construct virtual interrupt spot, need create according to the abnormal context scene of real processor, to guarantee, by the processing entrance from processing module that the passes to complete true context of processor, entering afterwards step 3);
Step 3): to from processing module redirect, enter into accordingly from processing module, enter afterwards step 4), need to ensure that register that redirect uses is in the scene of virtual interruption, preservation be the content entering before basic handling module;
Step 4): from processing module inside, the entrance of respective interrupt processing is revised as from virtual interrupt spot and obtains interruption context, build the interruption context preservation mode from processing module, enter afterwards the function treatment from processing module.
For respectively, from processing module, what needs were revised only has a link, by the entrance of respective interrupt processing, is revised as from virtual interrupt spot, instead of obtains interruption context from real processor interrupt spot, builds and interrupts context preservation mode.
In the method, do not need to carry out any amendment completely for function treatment part and the outlet processing capacity of each original functional module, can be successfully completed the integrated of multiple functional modules.
The advantage that the present invention has and beneficial effect: the present invention is that a kind of processor resource based on virtual interruption uses the lotus root method of separating, by this method, can be by different abnormality processing modules, with minimum change cost, just complete integratedly, ensure each module original function normal operation simultaneously. Further, use the method, the sightless module of concrete function processing procedure, also can complete integrated smoothly.
Brief description of the drawings
Fig. 1 is the handling process schematic diagram of original functional module;
Fig. 2 is original functional module required interruption context preservation mode example figure separately;
Fig. 3 uses the present invention to carry out the handling process schematic diagram after integrated.
Detailed description of the invention
Below in conjunction with Figure of description, the present invention is elaborated, what Fig. 1 showed is the handling process of two original functional module, and its entrance and exit is separately processed visible, and concrete function treatment part can be black box invisible mode. Fig. 2 shows that two functional modules move the interruption context preservation mode needing separately. Can find out, two functional module inside, in the time obtaining the same register interrupting in context, can be used different base address and different skews.
While using this method, first selecting a functional module is basic handling module, and in Fig. 3, selecting modules A is basic handling module. After this, interrupt normally processing after contextual protection completes in modules A, first, according to interrupt source or other processor states mark, carry out the selection of interrupt function processing module. As the step S1 of Fig. 3.
After selecting, determine that this interruption should be processed by basic handling module, current has been the needed interruption context of basic handling module preservation mode, as the modules A in Fig. 2 is interrupted context preservation mode. Now do not need to carry out constructing of virtual interrupt spot, directly enter in relevant functional processing module. As moved the interruption processing capacity of modules A in Fig. 3.
If result should be by other processing module processing, carry out virtual interrupt spot and construct, as the step S2 of Fig. 3. Constructing of virtual interrupt spot is to create according to the abnormal context scene of real processor. Need to ensure that its specific implementation can be by the processing entrance from processing module that the passes to complete true context of processor. A feasible implementation, is that the state of all registers is all returned in real register file, and the register that processor redirect need to be used, and expendable status register, be saved in the virtual register of particular memory.
After virtual interrupt spot has been constructed, can be by modes such as function calls, enter into accordingly from processing module. Need to ensure that the register that uses of redirect is in the scene of virtual interruption, preservation be the content entering before basic handling module. As step S3 in Fig. 3.
From processing module inside, by the entrance of respective interrupt processing, be revised as from virtual interrupt spot, instead of obtain interruption context from real processor interrupt spot, build and interrupt context preservation mode. As step S4 in Fig. 3. Complete after this process, in system, be built into as the module B interruption context preservation mode in Fig. 2. Now can carry out the function treatment from module. As moved the interruption processing capacity of modules A in Fig. 3.
Complete after above step, disparate modules can realize integrated in a system.
Embodiment: application scenarios is as follows: on PowerPC755 processor, use respectively processor outside abnormal, realize and verified the scheduling feature of operating system, and the system debug function of application software. Wherein scheduling feature module is used timer to interrupt as interrupt source, and system debug functional module is used serial ports to interrupt as interrupt source. Two modules are processed difference to the contextual protection after entering extremely, and wherein system debug functional module, removes and interrupt outside entrance and exit processing, and the realization of its inside function is that black box is sightless; And the realization of scheduling feature module depends on the context environmental of its protection very much, if revised, need to carry out a series of checkings. Now need to be by two module integration to software systems.
Now, can use method of the present invention, concrete steps are as follows:
First, selective system debug function module, as basic handling module, using scheduling feature module as from processing module. In system debug functional module, after normal entry contextual protection completes, which the interrupt source that judges current initiation external interrupt is. If current for serial ports interrupts, the flow process of direct operational system debug function module remainder, after handling, is used the outlet processing of system debug functional module to return; If current for timer interrupts, continue following process.
Construct virtual interrupt spot, the method for use is that the register context that major part is preserved returns in actual physical register. Partial status register and redirect are used the preservation address of specific memory headroom as virtual register with register.
Afterwards, jump to the porch from processing module, from the interruption entrance processing module of processing module, from virtual interrupt spot, obtain interruption context, construct needed context saving scene. Afterwards, can move from processing capacity module. By actual verification, two modules can fast integration, and the equal normal operation of function is errorless.
The present invention can also have other various embodiments; without departing from the spirit and substance of the case in the present invention; those of ordinary skill in the art are when making according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (1)

1. the processor resource based on virtual interruption uses the lotus root method of separating; it is characterized in that: in the time occurring extremely, interrupt; select a functional module as basic handling module; all the other functional modules are from processing module; after the normal interruption processing entrance contextual protection work of basic handling module completes, complete successively following steps:
Step 1): interrupt function processing module is selected, or after selecting, this interruption should be processed by basic handling module, do not need to carry out the structure of virtual interrupt spot, directly enter in the function treatment of basic handling module, if the result obtaining indicates and currently should, by from processing module processing, enter step 2);
Step 2): construct virtual interrupt spot, need create according to the abnormal context scene of real processor, to guarantee, by the processing entrance from processing module that the passes to complete true context of processor, entering afterwards step 3);
Step 3): to from processing module redirect, enter into accordingly from processing module, enter afterwards step 4), need to ensure that register that redirect uses is in the scene of virtual interruption, preservation be the content entering before basic handling module;
Step 4): from processing module inside, the entrance of respective interrupt processing is revised as from virtual interrupt spot and obtains interruption context, build the interruption context preservation mode from processing module, enter afterwards the function treatment from processing module.
CN201410650080.5A 2014-11-14 2014-11-14 Processor resource use decoupling method based on virtual interrupt Pending CN105607891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410650080.5A CN105607891A (en) 2014-11-14 2014-11-14 Processor resource use decoupling method based on virtual interrupt

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410650080.5A CN105607891A (en) 2014-11-14 2014-11-14 Processor resource use decoupling method based on virtual interrupt

Publications (1)

Publication Number Publication Date
CN105607891A true CN105607891A (en) 2016-05-25

Family

ID=55987847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410650080.5A Pending CN105607891A (en) 2014-11-14 2014-11-14 Processor resource use decoupling method based on virtual interrupt

Country Status (1)

Country Link
CN (1) CN105607891A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766141A (en) * 2017-11-07 2018-03-06 福建北峰通信科技股份有限公司 A kind of method for managing embedded system GPIO interrupt processings

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135997A (en) * 2006-08-29 2008-03-05 联想(北京)有限公司 Virtual machine system and hardware equipment interrupt handling method thereof
CN101944044A (en) * 2010-09-28 2011-01-12 凌阳科技股份有限公司 Method and device for virtual interrupt
US20120324166A1 (en) * 2009-12-10 2012-12-20 International Business Machines Corporation Computer-implemented method of processing resource management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135997A (en) * 2006-08-29 2008-03-05 联想(北京)有限公司 Virtual machine system and hardware equipment interrupt handling method thereof
US20120324166A1 (en) * 2009-12-10 2012-12-20 International Business Machines Corporation Computer-implemented method of processing resource management
CN101944044A (en) * 2010-09-28 2011-01-12 凌阳科技股份有限公司 Method and device for virtual interrupt

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766141A (en) * 2017-11-07 2018-03-06 福建北峰通信科技股份有限公司 A kind of method for managing embedded system GPIO interrupt processings
CN107766141B (en) * 2017-11-07 2021-07-20 福建北峰通信科技股份有限公司 Method for managing interrupt processing of GPIO (general purpose input/output) of embedded system

Similar Documents

Publication Publication Date Title
US9632860B2 (en) Multicore processor fault detection for safety critical software applications
US8984349B2 (en) Method and system for automating the process of testing a device
KR102262176B1 (en) Avoiding premature enabling of nonmaskable interrupts when returning from exceptions
EP3306470B1 (en) Method and apparatus for executing non-maskable interrupt
US20140115402A1 (en) Method and system for postponed error code checks
US20050022062A1 (en) Method for debugging reconfigurable architectures
CN110737895A (en) Extending dynamic detection of malware using static and dynamic malware analysis
CN101213518A (en) System and method to optimize OS context switching by instruction group trapping
US9274800B2 (en) Dynamic evaluation and adaption of hardware hash functions
US10817344B2 (en) Directed and interconnected grid dataflow architecture
US20180095764A1 (en) Control flow integrity
CN100501757C (en) Virtual executive system and method based on code slice
CN110352400A (en) Method and apparatus for handling message
Kaiser et al. VEDLIoT: very efficient deep learning in IoT
CN105607891A (en) Processor resource use decoupling method based on virtual interrupt
Ferreira et al. Low latency reconfiguration mechanism for fine-grained processor internal functional units
Paul et al. Resource-awareness on heterogeneous MPSoCs for image processing
CN106874072B (en) Embedded operating system partition virtual interrupt processing method based on PowerPC processor
CN107818071B (en) Hardware thread implementation method based on FPGA
US20180349253A1 (en) Error handling for device programmers and processors
Siirtola et al. When do we not need complex assume-guarantee rules?
JP6333201B2 (en) Method and computer program executed on a computer to form a control program executable on a control system from a graphic control model
CN104268027B (en) The fault handling method and device of embedded real-time operating system
Schmidt et al. Improving fpga design and evaluation productivity with a hardware performance monitoring infrastructure
US9336011B2 (en) Server and booting method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20160525