Page 2 of 2
Re:loop - double fault
Posted: Thu Jun 12, 2003 8:03 am
by LOneWoolF
um, yea, but, i don't use bochs
that thing can't find my vga font, but i installed it! with the script, and manually... but what for do i have 5 PCs at home? *gg* 6... and 2 of that 6 share a screen...
ok lez go and try 2 correct that ICW
GreeZ
LOneWoolF
i can't get that to work...
what values do i need?
isn't
sfnm+8086 enough?
not easy
isn't the code on that tut correct?
http://osdev.neopages.net/tutorials/pic.php
maybe there is another error?
Re:loop - double fault
Posted: Thu Jun 12, 2003 3:38 pm
by Pype.Clicker
no. The code on that tutorial will work with some chipsets, but not all. Only the ICW4 must be adapted, so i don't think a complete new tutorial is needed. The 8085/8086 bit must be defined to "8086" (i think it's a 1) and the slave/master bit must be set to master on 0x21 and to slave on 0xA1 (hehe. i guess you would never have found this on your own :p -- joking of course)
Re:loop - double fault
Posted: Fri Jun 13, 2003 5:38 am
by LOneWoolF
guess what, i got bochs to work... lol
ok it says
Code: Select all
...
00000000000i[XGUI ] [x] Mouse off
00000004256i[BIOS ] rombios.c,v 1.85.2.1 2003/01/16 21:58:42 cbothamy Exp $
00000330043i[KBD ] reset-disable command received
00000506792e[HD ] device set to 0 which does not exist
00000507085e[HD ] device set to 1 which does not exist
00000650185p[PIC ] >>PANIC<< write to port 20h = 21
00000650185i[SYS ] Last time is 1055503411
00000650185i[XGUI ] Exit.
...
that means i send the icw4 that way? (now with code of the FAQ on mega-tokyo,... i found that code and wanted to try
Code: Select all
...
outb(PIC1_DATA, ICW4_8086+ICW4_BUF_MASTER);
io_wait();
outb(PIC2_DATA, ICW4_8086+ICW4_BUF_SLAVE);
io_wait();
...
---
erm, same error...
i think, i'm
stuck in a complete wrong thought....
Re:loop - double fault
Posted: Fri Jun 13, 2003 6:19 am
by distantvoices
hmmm... here is what runs for me without trouble:
Code: Select all
#define INT_CTL 0x20
#define INT2_CTL 0xa0
#define INT_CTLMASK 0x21
#define INT2_CTLMASK 0xa1
#define ICW1 0x11
#define ICW4 0x01
and here is the function definition:
void init_pics(int pic1,int pic2){
outport(INT_CTL,ICW1);
outport(INT2_CTL,ICW1);
outport(INT_CTLMASK,pic1);
outport(INT2_CTLMASK,pic2);
outport(INT_CTLMASK,4);
outport(INT2_CTLMASK,2);
outport(INT_CTLMASK,ICW4);
outport(INT2_CTLMASK,ICW4);
outport(INT_CTLMASK,0xff);
}
It runs on my *old* machine, it runs on bochs, it runs on my *new* machine, it runs on some other ones too... mixed bits, various motherboards, various cpu's ... no problem with it. I have to admit, I have learned this way by heavy researching and then cutting several tutorials down to the nitty gritty.
Re:loop - double fault
Posted: Fri Jun 13, 2003 6:27 am
by LOneWoolF
thx
and sorry for my "shouting" in fewer posts...
i'll try that when i come back home
----------------------------------------
(sorry for capitals... but read.... then you'll understand... )
I HAVE TO LOL!!!
not my remapPIC function was wrong....
my outb was wrong
Re:loop - double fault
Posted: Sat Jun 14, 2003 8:53 am
by LOneWoolF
I have an interesting question:
Why do my interrupts work... (like we've seen)
but my keyboard not?
i did exactly what i did with the interrupts...
maskIRQ(1);
AddInt(IRQ1 (second var of an ENUM starting with 0x20), _isrkey, 0);
unmaskIRQ(1);
_isrkey calls _isr_key{ printf("-->KEY_PRESSED");}
Re:loop - double fault
Posted: Sun Jun 15, 2003 7:08 am
by Pype.Clicker
note that if you don't send an "EOI" signal when the timer completes, all other interrupts remains blocked ...
Also note that no keyboard interrupt will be triggered as long as the pending byte hasn't been read out of 0x60 port ...
Re:loop - double fault
Posted: Sun Jun 15, 2003 11:25 am
by LOneWoolF
timer?
do u mean the IRQ0? (i added it and it wasn't even called a first time..<-)
and what about the AEOI for ICW?
ok i noticed, my ints and isr never sent the EOI, but now i added
SendEOI
wich does
outb(MASTER, EOI);
master = 0x20
eoi = 0x20...
outb(0x20, 0x20)looks strange, is that correct? 'cause thaz what the idtsample kernel does ...
Re:loop - double fault
Posted: Mon Jun 16, 2003 1:25 am
by Pype.Clicker
yep. outb(0x20,0x20) is just the right way to signal the end of interrupt.
And no, it wouldn't be wise to turn on auto-end of interrupt as Intel infrastructure require 0x20,0x20 to be sent. As you probably ignore how "auto-EOI" is supposed to work, whether intel CPU provides the required info to the PIC to make it work or even if your chipset implements that feature ...
Re:loop - double fault
Posted: Mon Jun 16, 2003 4:12 am
by LOneWoolF
hihi
not even the timer fires an irq... they seem to be killed... but the exception-ints work... weird...
i dunno what to do...
yes i know i'm getting on your nervs with my sources... again i added it<-
[attachment deleted by admin]
Re:loop - double fault
Posted: Mon Jun 16, 2003 7:18 am
by Pype.Clicker
One thing you should ask yourself is "what is the state of the IRQ mask register" ?
Clearly, you masked independently every interrupt but IRQ0, then unmasked IRQ1...
But what was the initial value of irqs ?
Also, are you aware of the fact unmasking irq8..f will have no effect until you unmask irq2 aswell ?
i would suggest you read the mask status (i.e. inb(0x21)) and display it before you rely on its content. Remember the "USHORT irqs;" statement will *not* enforce irqs==0 at start until you actually clear the BSS region before you enter C code...
Re:loop - double fault
Posted: Mon Jun 23, 2003 3:29 am
by LOneWoolF_PublicPC
K i now read the irq stat into my USHORT irqs; and checkit, but nothing changed....