Background technology
The host circuit of computer platform all adopts look-at-me (interrupts) allow each peripheral device basically, for example hard disk unit, optical disc apparatus, key board unit, mouse apparatus etc., when needs carry out exchanges data with central processing unit, send interrupt request information and interrupt the work that central processing unit is carried out at present, allow central processing unit transfer to carry out the exchanges data action that the required driver of peripheral device carries out the peripheral device request.
PIC (Programmable Interrupt Controller) is a kind of programmable interruptable controller that Intel company (Intel) develops for personal computer, provide the interrupt control function of programmable to the host circuit of personal computer, give each peripheral device with programmable mode appointing system disrupted circuit IRQ; IO-APIC (I/O Advanced Programmable InterruptController) then is the programmable interruptable controller a kind of novel and with better function that Intel company develops, and is specially adapted to provide in the computer motherboard (for example mainboard of server) at multiprocessor (Multi-Processor) the look-at-me processing capacity of multitask.
In practical application, when the IO-APIC chip uses traditional PIC operator scheme, its practice normally is connected to PCI (PeripheralComponent Interconnect) controller with the IRQ system break circuit of computer platform, and make this pci controller receive that peripheral device sends make look-at-me by oneself the time, produce corresponding PCI look-at-me (PCI interrupt), even CPU (central processing unit) responds this PCI look-at-me, activate and carry out corresponding driver by predetermined system break circuit IRQ.In addition, when using advanced APIC operator scheme, the configuration of its look-at-me then needs pre-defined BIOS at computer platform (BasicInput/Output System, BIOS) multiprocessor in (Multi-Processor, MP) allocation list or ACPI (Advanced Configuration and Power Interface) allocation list.
In the practical application, make look-at-me and PCI look-at-me by oneself under the PIC operator scheme during shared system disrupted circuit IRQ, because BIOS dynamically appointing system disrupted circuit IRQ gives the PCI peripheral device, therefore can make the driver of making look-at-me by oneself can't ask system break circuit IRQ.Therefore at present the multiprocessor host circuit board in the server all is independently to use making look-at-me by oneself, not with the peripheral device shared system disrupted circuit IRQ of other type.But the shortcoming of this way is that BIOS must make interrupt module by oneself at each and find out system break circuit IRQ fixing, that be not used, therefore can make relevant bios program design become comparatively complicated, difficult.
Summary of the invention
For overcoming the shortcoming of above-mentioned prior art, fundamental purpose of the present invention is to provide a kind of the interruption to make look-at-me response processing method and system by oneself under the shared mechanism, allow make by oneself look-at-me and the non-peripheral component interconnect express of making interruption by oneself in the computer platform share system break circuit IRQ on the computer platform, just can provide the response processing capacity, can not make the bios program design complicated, difficult more in the look-at-me of making by oneself of interrupting under the shared mechanism peripheral component interconnect express of making interruption by oneself being sent.
Under the interruption shared mechanism of the present invention make the look-at-me response processing method by oneself and system arranges in pairs or groups to computer platform, and this computer platform is equipped with the programmable interruptable controller, makes the peripheral component interconnect express and the non-peripheral component interconnect express of making interruption by oneself of interruption by oneself, PCI (Peripheral Component Interconnect) formula peripheral component interconnect express is for example made by oneself this under the interruption shared mechanism of this computer platform and is interrupted the look-at-me (user-defined interrupt signals) of making by oneself that peripheral component interconnect express sends the response processing capacity is provided.
The look-at-me response processing method of making by oneself under the interruption shared mechanism of the present invention comprises at least: the default setting allocation list that interrupts, and this interruption sets that allocation list is pre-defined to be had virtual bench to correspond to this to make the interruption peripheral component interconnect express by oneself, and simultaneously pre-definedly has this to make by oneself to interrupt each peripheral device that peripheral component interconnect express overlapped and should non-ly make which the shared same system disrupted circuit that interrupts in the peripheral device that peripheral component interconnect express overlapped by oneself; When practical operation, respond this and make each that interrupt that peripheral device that peripheral component interconnect express overlapped produces by oneself and make look-at-me by oneself, send the Interrupt Process active information; Respond this Interrupt Process active information, from this interruption setting allocation list, find out this and make look-at-me and this non-shared same system disrupted circuit of which peripheral device that interrupts in the peripheral component interconnect express of making by oneself by oneself; Find out system break circuit that the two is shared from this non-making by oneself the allocating cache device that interrupts under the peripheral component interconnect express; And, activate the required driver of this peripheral device whereby by this system break circuit execution interrupt action, carry out this driver and handle the disrupted condition that this peripheral device produces at present by this system break circuit.
The look-at-me response processing system of making by oneself under the interruption shared mechanism of the present invention comprises at least: make the look-at-me respond module by oneself, each that responds that this makes that peripheral device of interrupting the peripheral component interconnect express overlap joint produces by oneself made look-at-me by oneself, sends the Interrupt Process active information; Make the look-at-me processing module by oneself, wherein be preset with and interrupt setting allocation list, and this interruption sets that allocation list is pre-defined to be had virtual bench to correspond to this to make the interruption peripheral component interconnect express by oneself, and simultaneously pre-definedly has this to make by oneself to interrupt each peripheral device that peripheral component interconnect express overlapped and should non-ly make which the shared same system disrupted circuit that interrupts in the peripheral device that peripheral component interconnect express overlapped by oneself; And during practical operation, this is made the look-at-me processing module by oneself and responds this and make the Interrupt Process active information that the look-at-me respond module is sent by oneself, set from this interruption and to find out this allocation list and make look-at-me by oneself and should non-ly make which peripheral device that interrupts in the peripheral component interconnect express by oneself and share the same system disrupted circuit, and then find out the two shared system break circuit from this non-making by oneself the allocating cache device that interrupts under the peripheral component interconnect express; And driver active module, make the system break circuit that the look-at-me processing module is found out by oneself by this, activate the required driver of this peripheral device, carry out this driver and handle the present disrupted condition that produces of this peripheral device by this system break circuit.
In sum, allocation list is set in the pre-defined interruption of look-at-me response processing method and system of making by oneself under the interruption shared mechanism of the present invention, and this interruption sets that allocation list is pre-defined to be had virtual bench to correspond to this to make the interruption peripheral component interconnect express by oneself, and simultaneously pre-definedly has this to make by oneself to interrupt each peripheral device that peripheral component interconnect express overlapped and should non-ly make which the shared same system disrupted circuit that interrupts in the peripheral device that peripheral component interconnect express overlapped by oneself; During practical operation, this is made the look-at-me processing module by oneself and promptly responds this and make the Interrupt Process active information that the look-at-me respond module is sent by oneself, set from this interruption and to find out this allocation list and make look-at-me by oneself and should non-ly make which peripheral device that interrupts in the peripheral component interconnect express by oneself and share the same system disrupted circuit, and then find out the two shared system break circuit from this non-making by oneself the allocating cache device that interrupts under the peripheral component interconnect express.The present invention allows make by oneself look-at-me and the non-peripheral component interconnect express of making interruption by oneself in the computer platform share system break circuit on this computer platform, can not increase the complicacy and the difficulty of program design.
Embodiment
Embodiment
Below be conjunction with figs., describe the embodiment that makes look-at-me response processing method and system by oneself under the interruption shared mechanism of the present invention in detail.
Fig. 1 is application structure and the Object Oriented OO component model (object-oriented component model) thereof of making look-at-me response processing system (part that comprises as label 100 frame of broken lines) by oneself under the interruption shared mechanism of the present invention.As shown in the figure, making by oneself in 100 practical applications of look-at-me response processing system under the interruption shared mechanism of the present invention is to carry to computer platform 10, particularly adopt the computer platform of multiprocessor (Multi-Processor) structure, server for example, and this computer platform 10 disposes the programmable interruptable controller 20 of specific model, for example is standardized APIC (Advanced ProgrammableInterrupt Controller) the programmable interruptable controller of Intel company's research and development.In addition, this computer platform 10 also disposes the non-peripheral component interconnect express 40 of making the peripheral component interconnect express 30 of interruption by oneself and making interruption by oneself, this non-peripheral component interconnect express 30 of making interruption by oneself peripheral component interconnect express 30 that for example is PCI (Peripheral ComponentInterconnect) wherein, overlap joint to one or more PCI peripheral devices (show 3 peripheral devices 31,32,33 in Fig. 1; In practical application, the number of these PCI peripheral devices is also unrestricted); These peripheral component interconnect express 40 overlap joints to one or more peripheral devices of making interruption by oneself of making interruption by oneself (show 2 peripheral devices 41,42 that can make interruption by oneself in Fig. 1; But in the practical application, it is also unrestricted that these can make the number that interrupts peripheral device by oneself).These peripheral devices 31,32,33,41,42 for example are external hard drive device, external optical disc apparatus, the network printer, network connection device etc.In addition, this computer platform 10 is also installed its corresponding driver 51,52,53,54,55 at each PCI peripheral device 31,32,33 and each peripheral device 41,42 that can make interruption by oneself respectively in advance.
During practical operation, the look-at-me response processing system 100 of making by oneself under the interruption shared mechanism of the present invention promptly allows the peripheral device 41 of each made by oneself interruption of overlap joint on this computer platform 10,42 send make the PCI peripheral device 31 that look-at-me (user-defined interrupt signals) and PCI peripheral component interconnect express 30 of should be non-making interruption by oneself overlap by oneself, 32,33 share the system break circuit IRQ on this computer platform 10, just to the peripheral device 41 of each made by oneself interruptions of this computer platform 10 overlap joints, 42 look-at-mes of sending respectively of making by oneself provide the response processing capacity, find out each whereby and make the pairing system break circuit of look-at-me IRQ by oneself, make the CPU (central processing unit) 11 of this computer platform 10 activate and carry out each peripheral device that can make interruption by oneself 41 by this system break circuit IRQ, 42 corresponding respectively drivers 54,55.
As shown in Figure 1, the Object Oriented OO component model (object-oriented componentmodel) of the inner structure of making look-at-me response processing system 100 by oneself under the interruption shared mechanism of the present invention comprises at least: (a) make look-at-me respond module 110 by oneself; (b) make look-at-me processing module 120 by oneself; And (c) driver active module 130.During concrete enforcement, making look-at-me response processing system 100 by oneself and can realize with computer program fully under this interruption shared mechanism, and this computer program for example is integrated into operating system (operating system in this computer platform 10 in add-on module (add-on module) mode, OS), and carry out, thereby provide the required look-at-me response processing capacity of making by oneself by the CPU (central processing unit) 11 of this computer platform 10.
Make by oneself look-at-me respond module 110 this programmable interruptable controller 20 receive that any peripheral device that can make interruption by oneself 41,42 sends make look-at-me by oneself the time, responsively send the Interrupt Process active information to making look-at-me processing module 120 by oneself.
Make by oneself to be preset with in the look-at-me processing module 120 and interrupt setting allocation list 121, and this interruption is set, and allocation list 121 is pre-defined a virtual bench (virtual device), this virtual bench corresponds to this and makes by oneself and interrupt peripheral component interconnect express 40, and simultaneously pre-defined this made the shared same system disrupted circuit IRQ of which peripheral device (31,32 or 33) that interrupts in each peripheral device 41,42 that peripheral component interconnect express 40 connected and this non-PCI peripheral component interconnect express 30 of making interruption by oneself by oneself.During practical operation, this makes look-at-me processing module 120 by oneself and promptly responds the above-mentioned Interrupt Process active information that look-at-me respond module 110 is sent of making by oneself, set to find out which peripheral device (31 in look-at-me and this non-PCI peripheral component interconnect express 30 of making interruption by oneself made by oneself that receives at present allocation list 121 from this interruption, 32, or 33) share same system disrupted circuit IRQ, and then find out the system break circuit IRQ that this is shared the PCI allocating cache device (PCI Configuration Register) 13 under this non-PCI peripheral component interconnect express 30 of making interruption by oneself.During concrete enforcement, it for example is multiprocessor (Multi-Processor, MP) allocation list or ACPI (the Advanced Configuration and Power Interface) allocation list that is based upon in the BIOS system program 12 of this computer platform 10 that allocation list 121 is set in this interruption.Fig. 2 interrupts setting the embodiment that allocation list 121 is based upon the MP allocation list, wherein Source_BUS_ID and Source_BUS_IRQ are used for the defining virtual device, and Destination_IOAPIC_ID and Destination_IOAPIC_INTIN then define APIC programmable interruptable controller 20 pairing look-at-mes.
Driver active module 130 is made the system break circuit IRQ that look-at-me processing module 120 is found out by oneself by above-mentioned, activate this and send the required driver (54 or 55) of peripheral device (41 or 42) of making look-at-me by oneself, carry out this driver (54 or 55) and handle the disrupted condition that this sends the present generation of peripheral device (41 or 42) of making look-at-me by oneself.
In following application example, suppose that peripheral device 41 is external hard drive modules, and this external connected hand disk module is connected to making by oneself of this computer platform 10 by the hot plug mode and interrupts peripheral component interconnect express 40 and send and make look-at-me by oneself.
Under above-mentioned condition, peripheral device 41 sends makes look-at-me by oneself and promptly can at first be sent to programmable interruptable controller 20, make making by oneself under the interruption shared mechanism of the present invention make look-at-me respond module 110 by oneself in the look-at-me response processing system 100, responsively detect this situation and send the Interrupt Process active information to making look-at-me processing module 120 by oneself, order is made look-at-me processing module 120 by oneself and is responsively set which peripheral device (31 of finding out the allocation list 121 in this peripheral device 41 and this PCI peripheral component interconnect express 30 from this interruption, 32, or 33) share the same system disrupted circuit, and then find out the system break circuit IRQ that this is shared the PCI allocating cache device 13 under this PCI peripheral component interconnect express 30.
Under the PIC operator scheme, make look-at-me processing module 120 by oneself and for example will carry out following steps:
(S1) from the MP allocation list, check which virtual bench and this make look-at-me by oneself and share identical APIC_ID and APIC_INTIN;
(S2) check BUS and the Device numbering that this virtual bench uses;
(S3) check allocating cache device 13, find out the employed system break circuit of this virtual bench IRQ;
(S4) utilize this system break circuit IRQ to carry out interrupt action.
Otherwise, under APIC or ACPI operator scheme, make look-at-me processing module 120 by oneself and for example will carry out following steps:
(S1) from the MP allocation list, check the IRQ configuration on each IO-APIC;
(S2) check APIC_ID and the APCI_INTIN that the virtual bench in this MP allocation list uses;
(S3) appointing system disrupted circuit IRQ gives this virtual bench;
(S4) read the APIC state;
(S5) determine spendable system break circuit IRQ under the present APIC state;
(S6) utilize this system break circuit IRQ to carry out interrupt action.
Make the system break circuit IRQ that look-at-me processing module 120 is found out by oneself, can make driver active module 130 carry out interrupt action by it, activate this peripheral device 41 pairing drivers 54 whereby, make this driver 54 be performed and handle the disrupted condition that this peripheral device 41 produces at present by this system break circuit IRQ.
The implementation procedure of making the look-at-me disposal route by oneself under the interruption shared mechanism of the present invention is: the default setting allocation list 121 that interrupts, and this interruption sets that allocation list 121 is pre-defined to be had virtual bench to correspond to this to make by oneself and interrupt peripheral component interconnect express 40, and simultaneously pre-definedly has this to make by oneself to interrupt each peripheral device that peripheral component interconnect express 40 overlapped and should non-ly make which the shared same system disrupted circuit IRQ that interrupts in the peripheral device that peripheral component interconnect express 30 overlapped by oneself;
When practical operation, respond this and make each that interrupt that peripheral device that peripheral component interconnect express 40 overlapped produces by oneself and make look-at-me by oneself, send the Interrupt Process active information;
Respond this Interrupt Process active information, from this interruption setting allocation list 121, find out this and make look-at-me and this non-shared same system disrupted circuit of which peripheral device that interrupts in the peripheral component interconnect express of making by oneself by oneself;
Find out system break circuit that the two is shared from this non-making by oneself the allocating cache device that interrupts under the peripheral component interconnect express 30; And
Carry out interrupt action by this system break circuit, activate the required driver of this peripheral device whereby, carry out this driver and handle the disrupted condition that this peripheral device produces at present by this system break circuit.
Generally speaking, the invention provides and make look-at-me response processing method and system by oneself under a kind of interruption shared mechanism of novelty, arrange in pairs or groups to computer platform, allow making look-at-me by oneself and can share system break circuit IRQ on this computer platform on this computer platform with the non-peripheral component interconnect express of making interruption by oneself; And its characteristics are pre-defined interruption setting allocation list, and this interruption sets that allocation list is pre-defined to be had virtual bench to correspond to this to make the interruption peripheral component interconnect express by oneself, and simultaneously pre-definedly has this to make each peripheral device that interrupts the peripheral component interconnect express overlap joint and which the shared same system disrupted circuit that should non-ly make by oneself in the peripheral device that interrupts the peripheral component interconnect express overlap joint by oneself.The present invention can allow make by oneself look-at-me and the non-peripheral component interconnect express of making interruption by oneself in the computer platform share system break circuit IRQ on this computer platform, can not make the bios program design become complicated, difficult more, so the present invention have better progressive and practicality than prior art.