Page 1 of 1

irq remap problem

Posted: Sat Jan 19, 2008 9:52 am
by packet50071
hi all

I get the following err after i remap the irq :(

i followed the tutorial form http://osdever.net/bkerndev/Docs/irqs.htm

Code: Select all

void irq_remap()
{
    outb(0x20, 0x11);
    outb(0xA0, 0x11);
    outb(0x21, 0x20);
    outb(0xA1, 0x28);
    outb(0x21, 0x04);
    outb(0xA1, 0x02);
    outb(0x21, 0x01);
    outb(0xA1, 0x01);
    outb(0x21, 0x0);
    outb(0xA1, 0x0);
	_printF("/n /n remap done ",RED);
 }
void irq_install()
{
    irq_remap();
    // idt_set(32, (unsigned)irq0, 0x08, 0x8E);
   //  idt_set(33, (unsigned)irq1, 0x08, 0x8E);
  //  idt_set(34, (unsigned)irq2, 0x08, 0x8E);
	//idt_set(35, (unsigned)irq3, 0x08, 0x8E);
	//idt_set(36, (unsigned)irq4, 0x08, 0x8E);
	//idt_set(37, (unsigned)irq5, 0x08, 0x8E);
	//idt_set(38, (unsigned)irq6, 0x08, 0x8E);
	//idt_set(39, (unsigned)irq7, 0x08, 0x8E);
	//idt_set(40, (unsigned)irq8, 0x08, 0x8E);
	//idt_set(41, (unsigned)irq9, 0x08, 0x8E);
	//idt_set(42, (unsigned)irq10, 0x08, 0x8E);
	//idt_set(43, (unsigned)irq11, 0x08, 0x8E);
	//idt_set(44, (unsigned)irq12, 0x08, 0x8E);
	//idt_set(45, (unsigned)irq13, 0x08, 0x8E);
	//idt_set(46, (unsigned)irq14, 0x08, 0x8E);
	//idt_set(47, (unsigned)irq15, 0x08, 0x8E);
	
}


Error the attach img
any help would be great :)
I have no clue y -- But some thing is written on the screen thats not suppose to be there
this error happens 2-3 sec after "remap done" is shown - if don't call remap its all good so it got to be some thing in that

i commented out the lines in the function one by one and noticed that it happened only if this code is executed

Code: Select all

outb(0x21, 0x20);
3rd line in that function

Posted: Sat Jan 19, 2008 10:50 am
by packet50071
i rewrote the code in asm and now its all alright I think :)