CN102033799B - Sensing method for abnormal status of interrupt pins - Google Patents

Sensing method for abnormal status of interrupt pins Download PDF

Info

Publication number
CN102033799B
CN102033799B CN 200910179208 CN200910179208A CN102033799B CN 102033799 B CN102033799 B CN 102033799B CN 200910179208 CN200910179208 CN 200910179208 CN 200910179208 A CN200910179208 A CN 200910179208A CN 102033799 B CN102033799 B CN 102033799B
Authority
CN
China
Prior art keywords
interrupt pins
abnormal
interrupt
sensing method
status
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.)
Expired - Fee Related
Application number
CN 200910179208
Other languages
Chinese (zh)
Other versions
CN102033799A (en
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.)
Hunan Zhongke Electric Co., Ltd.
Original Assignee
Inventec 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 Inventec Corp filed Critical Inventec Corp
Priority to CN 200910179208 priority Critical patent/CN102033799B/en
Publication of CN102033799A publication Critical patent/CN102033799A/en
Application granted granted Critical
Publication of CN102033799B publication Critical patent/CN102033799B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a sensing method for the abnormal status of interrupt pins, which comprises the following steps of: firstly, inquiring an advanced configuration and power interface table to acquire an interrupt status bit of each interrupt pin in a computer system; secondly, continuously checking whether each interrupt status bit is maintained to be a specific value or not all the time within fixed time; and finally, when the interrupt status bit of one of the interrupt pins is maintained to be the specific value all the time within the fixed time, determining that the interrupt pin is abnormal.

Description

The sensing method for abnormal status of interrupt pins
Technical field
The present invention relates to a kind of exception detecting method of computer system, and be particularly related to a kind of exception detecting method of interrupt pins.
Background technology
Generally speaking, under operating system, if central processing unit (the Center Processing Unit not carrying out other softwares, CPU) but always when busy condition (for example the utilization rate of CPU always near 100%), the user must guess that what reason to cause CPU by is busy condition by its experience.
For instance, after first all drivers being removed, observe again the utilization rate of CPU and whether recover normal.If it is normal that the utilization rate of CPU is recovered, then further seeking out is which driver causes again.Perhaps, after all device forbidden energy, normal if the utilization rate of CPU is recovered, then seeking is which device causes again.Moreover, if device can't forbidden energy, then utilize bus control bit (BUS master bit) in the peripheral element interface configuration space (PCI configuration space, PCI=Peripheral Component Interface) to come the sending of look-at-me of restraining device.
Yet what reason is classic method caused by from the utilization rate that table picture goes to guess CPU, and is not only inefficent, just in case device does not have driver or can't be with its forbidden energy, just can't learn whether by installing caused problem.Moreover, if be owing to hardware lines wrong mistake causes the one straight hair to go out look-at-me, also can't find its reason by classic method.
Summary of the invention
The invention provides a kind of sensing method for abnormal status of interrupt pins, to detect the interrupt pins of abnormal.
The present invention proposes a kind of sensing method for abnormal status of interrupt pins, is suitable for a computer system.Sensing method for abnormal status comprises: inquire about senior configuration and power interface (Advanced Configuration AndPower Interface, ACPI) form, with the interruption status position of each interrupt pins of obtaining computer system; Within a set time, check always whether each interruption status position is maintained a particular value always; When wherein the interruption status position of an interrupt pins is maintained above-mentioned particular value always within the set time, judge this interrupt pins abnormal.
In one embodiment of this invention, above-mentioned before the step of inquiry ACPI form, whether the utilization rate that also can judge first central processing unit arrives a threshold value, and when arriving threshold value with the utilization rate at central processing unit, inquiry ACPI form is to carry out the step of the unusual interrupt pins of follow-up detecting.
In one embodiment of this invention, the step of above-mentioned inquiry ACPI form can be inquired about the register address of each interrupt pins, with according to register address, obtains corresponding interruption status position.In addition, also can obtain according to the ACPI form the regional pin number of each interrupt pins.
In one embodiment of this invention, after the above-mentioned step judging the interrupt pins abnormal, can be a universe pin number with the regional pin number translated of the interrupt pins of abnormal.Then, obtain the corresponding device name of interrupt pins of abnormal according to universe pin number.Afterwards, the device name of the interrupt pins of recording exceptional, regional pin number and corresponding I/O APIC identification code.In addition, after judging the interrupt pins abnormal, also can point out an abnormal information.
In one embodiment of this invention, the device name of above-mentioned correspondence also can be obtained by driver corresponding to interrupt pins.
In one embodiment of this invention, above-mentioned sensing method for abnormal status also comprises the interrupt pins of forbidden energy abnormal.
In one embodiment of this invention, above-mentioned ACPI form comprises compound advanced programmable interrupt controller description list (Multiple APIC Description Table, MADT), compartment system description list (Differentiated System Description Table, DSDT) and fixing senior configuration and power interface description list (Fixed ACPI Description Table, FACP).
Based on above-mentioned, the present invention is by the difference of detection interrupt pins, and the device name of listing unusual interrupt pins and using this interrupt pins.Accordingly, can be with unusual interrupt pins forbidden energy so that the utilization rate of central processing unit recovers normal.And the developer can find out the problem points of abnormal and then with its reparation by the path that measures interrupt pins.
For above-mentioned feature and advantage of the present invention can also be become apparent, the below is especially exemplified by embodiment, and the cooperation accompanying drawing is described in detail below.
Description of drawings
Fig. 1 is the process flow diagram of sensing method for abnormal status of the interrupt pins of one embodiment of the invention.
Fig. 2 is the process flow diagram of the recording exceptional interrupt pins method of one embodiment of the invention.
Fig. 3 is the schematic diagram of the computer system of one embodiment of the invention.
Fig. 4 A and Fig. 4 B are the part schematic diagram of the ASL code of one embodiment of the invention.
The main element symbol description:
310,320:PCI device; 330,340:I/O APIC unit;
350: chip; 360: system timer;
The 370:PCI bridge;
S105~S120: each step of the sensing method for abnormal status of the interrupt pins of one embodiment of the invention;
S205~S220: each step of recording exceptional interrupt pins method of one embodiment of the invention.
Embodiment
Under operating system, if not carrying out other software when central processing unit almost always is near 100% utilization rate, the user must guess that what reason to cause central processing unit by is busy condition by its experience.For this reason, the present invention proposes a kind of sensing method for abnormal status of interrupt pins, by detecting whether abnormal of interrupt pins, goes out side by side the interrupt pins of abnormal and uses the device name of this interrupt pins.In order to make content of the present invention also for understanding, below the example that really can implement according to this as the present invention especially exemplified by embodiment.
For convenience of description, in following examples, for example be by an application software being installed to the storage unit of computer system, to carry out the sensing method for abnormal status of interrupt pins.This application software for example is to utilize C language, Java language supervisor language to write, to finish the sensing method for abnormal status of interrupt pins by the mode of automatic electronic.So do not limit to its range of application with this at this.
Fig. 1 is the process flow diagram of sensing method for abnormal status of the interrupt pins of one embodiment of the invention.The present embodiment is for the interrupt pins of detecting computer system abnormal whether.In the present embodiment, the operating system of computer system is to move under Advanced Programmable Interrupt Controllers APICs (Advanced Programmable InterruptController, APIC) pattern.At this, the central processing unit internal configurations of computer system has local APIC (Local APIC) unit, has in addition input and output APIC (I/O APIC) unit, process the interrupting information that input-output unit sends by I/O APIC unit, and Local APIC and I/O APIC then has respectively identification code separately.For example, suppose that computer system has two Local APIC and two I/O APIC, then its identification code is respectively 0~3.
Please refer to Fig. 1, at first, in step S105, inquire about senior configuration and power interface (AdvancedConfiguration And Power Interface, ACPI) form, with the interruption status position of each interrupt pins of obtaining computer system.In the present embodiment, the ACPI form comprises compound advanced programmable interrupt controller description list (Multiple APIC Description Table, MADT), compartment system description list
(Differentiated System Description Table, DSDT) and fixing senior configuration and power interface description list (Fixed ACPI Description Table, FADT).
Wherein, MADT comprises the address of memory mapped formula input and output (Memory-Mapped I/O, MMIO) of each I/O APIC and the identification code of I/O APIC.FADT comprises the universe pin number (global pinnumber) of system's control look-at-me (System Control Interrupt, SCI).DSDT comprises the corresponding device name of each interrupt pins.
At this, can obtain by inquiry MADT the MMIO address of each I/O APIC in the computer system, obtain respectively more regional pin number and the interruption status position of all interrupt pins on each I/O APIC by MMIO.Wherein, each interrupt pins has the register address of a correspondence, to deposit the interruption status position.For example, when the interruption mode bit is 0, represent that this interrupt pins is idle state (idle status) at present; When the interruption mode bit is 1, represent that this interrupt pins is pending status (pending status) at present.
Need to prove, when central processing unit is in busy condition when not carrying out any software, begin to carry out the sensing method for abnormal status of the present embodiment.For example, when operating system was not carried out other softwares, whether the utilization rate of judging central processing unit arrived a threshold value (for example, 90% or near 100%, can be set up on their own by the user).If operating system is not carried out other softwares, and the utilization rate of central processing unit has arrived above-mentioned threshold value, then expression abnormality may occur at present, therefore, begins to carry out the sensing method for abnormal status of the present embodiment, finds out according to this unusual interrupt pins.
Then, after obtaining the interruption status position of each interrupt pins, shown in step S110, within one period set time, check always whether each interruption status position is maintained a particular value always, judge according to this whether abnormal of corresponding interrupt pins.That is to say, sequentially check whether abnormal of each interrupt pins.
When the interruption mode bit is maintained above-mentioned particular value always within the set time, shown in step S115, judge the interrupt pins abnormal of this interruption status position correspondence.Otherwise, when the interruption mode bit changes (for example, the interruption status position is cleared), shown in step S120, judge the interrupt pins no exceptions of this interruption status position correspondence within the set time.
Generally speaking, if interrupt pins transmits look-at-me and triggers central processing unit, just then driver corresponding to this look-at-me can begin to carry out to serve this look-at-me.Under rational state, after through one period set time, (represent that this look-at-me is serviced complete), the interruption status position can be cleared.Therefore, if within one period set time, the interruption status position continues to maintain under the particular value (for example being 1) always, is irrational state.So situation may be that the look-at-me that corresponding device sends is unreasonable, or hardware connection mistake and cause interrupt pins constantly to send look-at-me.
For instance, the above-mentioned set time can be set as 0.5 second.When the interruption mode bit was 1 always in 0.5 second, the look-at-me that represents this interrupt pins can't be serviced, therefore judges the interrupt pins abnormal of this interruption status position correspondence.
Below for an embodiment treatment scheme after judging the interrupt pins abnormal is described again.Fig. 2 is the process flow diagram of the recording exceptional interrupt pins method of one embodiment of the invention.Please refer to Fig. 2, shown in step S205, after checking out unusual interrupt pins, is universe pin number (global pin number) with the regional pin number translated of unusual interrupt pins.Because the described interrupt vector table of the DSDT ASL code use of ACPI is universe pin number, therefore in order to make things convenient for subsequent treatment, be universe pin number with regional pin number translated just.
For instance, Fig. 3 is the schematic diagram of the computer system of one embodiment of the invention.In the present embodiment, peripheral element interface (Peripheral Component Interface, PCI) device is that PCI device 310 is connected to respectively I/O APIC unit 330 and I/O APIC unit 340 with PCI device 320.And PCI device 310 is connected to PCI bridge (PCI Bridge) 370 with PCI device 320.Chip 350 is connected to I/O APIC unit 330 with system timer 360.At this, I/O APIC unit 330 is respectively 2 and 3 with the identification code of I/O APIC unit 340.Identification code is each interrupt pins of 2 I/O APIC unit 330, and its universe pin number namely equals regional pin number; And identification code is each interrupt pins of 3 I/O APIC unit 340, and its universe pin number namely is that identification code is that the pin number of 2 I/O APIC unit adds each regional pin number, and is as shown in the table.
Afterwards, in step S210, obtain corresponding device name according to universe pin number.For example, inquiry DSDT is to obtain the device name of unusual interrupt pins according to universe pin number.And DSDT designs according to high level architecture power interface source language (ACPI Source Language, ASL) code.Can learn by DSDT which interrupt pins by which device is used at present.
Need to prove, if be Non-Plug and Play (Non Plug and Play, Non-PnP) device (for example system timer) can pass through its hardware identification code (hardware identification, HID) and obtain corresponding device name.In addition, if PnP device (for example PCI device), can obtain its device name with device identification code and manufacturer's identification code on its peripheral element interface configuration space (PCI configuration space, PCI=Peripheral ComponentInterface).In addition, if these devices have corresponding driver, then can obtain more accurate device name by driver.
For instance, Fig. 4 A and Fig. 4 B are the part schematic diagram of the ASL code of one embodiment of the invention.Wherein, Fig. 4 A be PCI device 310, PCI device 320 in the relevant information of the interrupt pins of ASL code, Fig. 4 B is that system timer 360 is in the relevant information of the interrupt pins of ASL code.
In Fig. 4 A, with universe pin number 26 (being the interrupt pins 2 of I/O APIC unit 340), its information corresponding in DSDT be " Package () { 0x0005FFFF; 0; 0; 26} ", and wherein " 0x0005 " is the PCI device and numbers (PCI device number).Just can obtain device identification code and manufacturer's identification code on its peripheral element interface configuration space (PCI configuration space) by pci bus numbering (PCI Busnumber), PCI device numbering (PCI device number), just can obtain again manufacturer and the device name of PCI device 320 by manufacturer's identification code and device identification code.
In Fig. 4 B, " IRQNoFlags () { 0} " represents universe pin number 0, the namely regional pin number 0 of I/O APIC unit 330.Wherein, " Name (_ HID, EISAID (" PNP0100 ")) " recorded HID, is " PNP0100 ".Accordingly, just can obtain the device name of system timer 360 by HID.
In addition, need to prove, also can inquire about the universe pin number that FADT obtains SCI, can learn by this whether by the SCI Anomalies Caused.In other words, when being checked through interrupt pins INT 9 abnormal of I/O APIC unit 330, by the inquiry FADT can learn that INT 9 receives SCI, but accordingly just decision-making system unusually may be since SCI cause.
Afterwards, return Fig. 2, in step S215, the information of the interrupt pins of recording exceptional, for example, the identification code of device name, regional pin number and I/O APIC unit is with the reference of safeguarding as the user.In addition, also can point out an abnormal information to notify the present system of user abnormality to occur.
At last, in step S220, with the interrupt pins forbidden energy of abnormal.For instance, also comprise mask (mask) position in register address corresponding to each interrupt pins.Wherein, masked bits is 0 o'clock, represents that the look-at-me that this interrupt pins triggers can send out; Masked bits is 1 o'clock, represents that this interrupt pins is forbidden energy, and can't transmit any look-at-me.Accordingly, detect unusual interrupt pins after, just masked bits can be set as 1, with this interrupt pins of forbidden energy.Thus, System Operation is just recovered normal.
In sum, the present invention is by the difference of detection interrupt pins, and the device name of listing unusual interrupt pins and using this interrupt pins.Accordingly, can find fast unusual interrupt pins, with unusual interrupt pins forbidden energy so that the utilization rate of central processing unit recovers normal.And the developer can find out the problem points of abnormal and then with its reparation effectively by the path that measures interrupt pins.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. the sensing method for abnormal status of an interrupt pins is suitable for computer system, and this sensing method for abnormal status comprises:
Inquire about senior configuration and power interface form, with a plurality of interrupt pins interruption status position separately of obtaining this computer system;
Within the set time, check always whether each described interruption status position is maintained particular value; And
When one of them interruption status position of described a plurality of interrupt pins is maintained this particular value within this set time, judge this interrupt pins abnormal.
2. the sensing method for abnormal status of interrupt pins according to claim 1 wherein before the step of this senior configuration of inquiry and power interface form, also comprises:
Whether the utilization rate of judging central processing unit arrives threshold value, when arriving this threshold value with the utilization rate at this central processing unit, inquires about this senior configuration and power interface form.
3. the sensing method for abnormal status of interrupt pins according to claim 1, the step of wherein inquiring about this senior configuration and power interface form comprises:
Inquire about described a plurality of interrupt pins register address separately, with according to this register address, obtain this corresponding interruption status position.
4. the sensing method for abnormal status of interrupt pins according to claim 1, the step of wherein inquiring about this senior configuration and power interface form also comprises:
Obtain described a plurality of interrupt pins regional pin number separately.
5. the sensing method for abnormal status of interrupt pins according to claim 4 wherein after the step of judging this interrupt pins abnormal, also comprises:
Be universe pin number with the regional pin number translated of this interrupt pins of abnormal; And
Obtain the corresponding device name of this interrupt pins of abnormal according to this universe pin number.
6. the sensing method for abnormal status of interrupt pins according to claim 5 is wherein obtained the step of corresponding device name according to this universe pin number, comprising:
Obtain this device name by driver corresponding to this interrupt pins.
7. the sensing method for abnormal status of interrupt pins according to claim 5 wherein after the step of the corresponding device name of this interrupt pins of obtaining abnormal, also comprises:
Record corresponding this device name of this interrupt pins, this zone pin number and Advanced Programmable Interrupt Controllers APICs identification code.
8. the sensing method for abnormal status of interrupt pins according to claim 1 wherein after the step of judging this interrupt pins abnormal, also comprises:
The prompting abnormal information.
9. the sensing method for abnormal status of interrupt pins according to claim 1 also comprises:
This interrupt pins of forbidden energy abnormal.
10. the sensing method for abnormal status of interrupt pins according to claim 1, wherein this senior configuration and power interface form comprise compound advanced programmable interrupt controller description list, compartment system description list and fixing Advanced Programmable Interrupt Controllers APICs description list.
CN 200910179208 2009-09-29 2009-09-29 Sensing method for abnormal status of interrupt pins Expired - Fee Related CN102033799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910179208 CN102033799B (en) 2009-09-29 2009-09-29 Sensing method for abnormal status of interrupt pins

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910179208 CN102033799B (en) 2009-09-29 2009-09-29 Sensing method for abnormal status of interrupt pins

Publications (2)

Publication Number Publication Date
CN102033799A CN102033799A (en) 2011-04-27
CN102033799B true CN102033799B (en) 2013-02-13

Family

ID=43886729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910179208 Expired - Fee Related CN102033799B (en) 2009-09-29 2009-09-29 Sensing method for abnormal status of interrupt pins

Country Status (1)

Country Link
CN (1) CN102033799B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577289A (en) * 2003-07-14 2005-02-09 Lg电子株式会社 Apparatus and method for controlling CPU speed transition
CN1834936A (en) * 2005-03-14 2006-09-20 佛山市顺德区顺达电脑厂有限公司 Power consumption monitoring system
CN101000575A (en) * 2006-01-13 2007-07-18 英业达股份有限公司 Computer program execution bottleneck analysing processing method and system
CN101206592A (en) * 2006-12-21 2008-06-25 英业达股份有限公司 Method for diagnosis of power supply management table

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577289A (en) * 2003-07-14 2005-02-09 Lg电子株式会社 Apparatus and method for controlling CPU speed transition
CN1834936A (en) * 2005-03-14 2006-09-20 佛山市顺德区顺达电脑厂有限公司 Power consumption monitoring system
CN101000575A (en) * 2006-01-13 2007-07-18 英业达股份有限公司 Computer program execution bottleneck analysing processing method and system
CN101206592A (en) * 2006-12-21 2008-06-25 英业达股份有限公司 Method for diagnosis of power supply management table

Also Published As

Publication number Publication date
CN102033799A (en) 2011-04-27

Similar Documents

Publication Publication Date Title
US7949863B2 (en) Inter-port communication in a multi-port memory device
EP1588260B1 (en) Hot plug interfaces and failure handling
US5717851A (en) Breakpoint detection circuit in a data processor and method therefor
US5813043A (en) Method and system including memory patching utilizing a transmission control signal and circuit
CN104932972B (en) A kind of method and device of reaction state debugging utility
US20180095806A1 (en) Technologies for fast boot with adaptive memory pre-training
CN104598402A (en) Flash memory controller and control method of flash memory controller
US20020099893A1 (en) System and method for the handling of system management interrupts in a multiprocessor computer system
KR100385499B1 (en) Data processor with transparent operation during a background mode and method therefor
CN104040519A (en) Host side implementation for hid i2c data bus
CN104111870A (en) Interrupt processing device and method
US20080250186A1 (en) Bus connecting device for connecting host with external device
CN103019848B (en) Method for realizing peripheral component interconnect (PCI) bus non-vector interrupt
CN100517177C (en) Combined type reset system processing method and device
US20030101042A1 (en) System for remotely loading and remotely maintaining an electronic card
GB2228600A (en) Interrupt test circuit for microprocessor system
KR970012153A (en) How to run data processor and breakpoint operations
US20180129624A1 (en) Method and apparatus for handling outstanding interconnect transactions
CN102033799B (en) Sensing method for abnormal status of interrupt pins
US10990544B2 (en) PCIE root complex message interrupt generation method using endpoint
US7895388B2 (en) Bus control device
CN113608914B (en) Chip, functional safety detection method of chip, medium and electronic equipment
CN109460241A (en) A kind of pre-installation method, system, electronic equipment and the storage medium of operating system
CN109343950A (en) A kind of interruption universal process method suitable for Xilinx soft-core processor
JP2004030161A (en) Method for controlling interrupt in computer system, computer system, semiconductor integrated circuit and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Fu Haodong

Inventor after: Li Aiwu

Inventor after: Xiang Xinxing

Inventor after: Li Yuehua

Inventor after: Xiao Peng

Inventor after: Zou Deyi

Inventor after: Yang Lijun

Inventor before: Lu Yingzhi

Inventor before: Li Sixian

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170418

Address after: Yueyang economic and Technological Development Zone, Yueyang Road, Hunan branch of Industrial Park

Patentee after: Hunan Zhongke Electric Co., Ltd.

Address before: Taipei City, Taiwan Chinese Shilin District Hougang Street No. 66

Patentee before: Inventec Corporation

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130213

Termination date: 20170929