Re: HD driver

Frode Vatvedt Fjeld <[email protected]> Tue, 20 Apr 2004 01:10:40 +0200
Newsgroups gmane.lisp.movitz.devel
Message-ID <[email protected]>
I added harddisk.lisp to CVS as losp/tmp/harddisk.lisp. I thought I'd
add the losp/tmp directory as a sort of scratch area for files like
these, so they can be developed somewhat before being moved somewhere
more sensible.

I looked briefly at your code, and thought I'd mention something about
interrupts. First, I changed the accessor (muerte:interrupt-handler
<function-name>) to (muerte:exception-handler <function>), so you
probably want to change to this. Also, remember that the IRQs are
routed throught the PIC (well, really the APIC I suppose) to some
exception number. The idt-init (x86-pc/interrupt.lisp) function does
this, and currently in los0 it's routed such that e.g. IRQ 14 becomes
exception number 32+14 = 46, if I'm not mistaken. Also you must make
sure interrupts are enabled (i.e. with STI), and that the PIC mask is
set up ok (accessor pic8259-irq-mask).

In short, if at all possible, it's probably a good idea initially to
have a stupidly-polling-but-guaranteed-to-work interface (but I don't
know anything about IDE hardware interfacing issues, so this may not
be possible).

-- 
Frode Vatvedt Fjeld