|
@@ -21,7 +21,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
21
|
21
|
extern char interrupt_wrapper[];
|
22
|
22
|
|
23
|
23
|
/** The interrupt vectors */
|
24
|
|
-static struct interrupt_vector intr_vec[ IRQ_MAX + 1 ];
|
|
24
|
+static struct interrupt_vector intr_vec[NUM_INT];
|
25
|
25
|
|
26
|
26
|
/** The interrupt descriptor table */
|
27
|
27
|
struct interrupt_descriptor idt[NUM_INT] __attribute__ (( aligned ( 16 ) ));
|
|
@@ -90,13 +90,11 @@ void set_interrupt_vector ( unsigned int intr, void *vector ) {
|
90
|
90
|
*/
|
91
|
91
|
void init_idt ( void ) {
|
92
|
92
|
struct interrupt_vector *vec;
|
93
|
|
- unsigned int irq;
|
94
|
93
|
unsigned int intr;
|
95
|
94
|
|
96
|
95
|
/* Initialise the interrupt descriptor table and interrupt vectors */
|
97
|
|
- for ( irq = 0 ; irq <= IRQ_MAX ; irq++ ) {
|
98
|
|
- intr = IRQ_INT ( irq );
|
99
|
|
- vec = &intr_vec[irq];
|
|
96
|
+ for ( intr = 0 ; intr < NUM_INT ; intr++ ) {
|
|
97
|
+ vec = &intr_vec[intr];
|
100
|
98
|
vec->pushal = PUSHAL_INSN;
|
101
|
99
|
vec->movb = MOVB_INSN;
|
102
|
100
|
vec->intr = intr;
|
|
@@ -105,6 +103,9 @@ void init_idt ( void ) {
|
105
|
103
|
( uint32_t ) vec->next );
|
106
|
104
|
set_interrupt_vector ( intr, vec );
|
107
|
105
|
}
|
|
106
|
+ DBGC ( &intr_vec[0], "INTn vector at %p+%xn (phys %#lx+%xn)\n",
|
|
107
|
+ intr_vec, sizeof ( intr_vec[0] ),
|
|
108
|
+ virt_to_phys ( intr_vec ), sizeof ( intr_vec[0] ) );
|
108
|
109
|
|
109
|
110
|
/* Initialise the interrupt descriptor table register */
|
110
|
111
|
idtr.base = virt_to_phys ( idt );
|