pic identification

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Hellboy
Posts: 7
Joined: Tue Jan 13, 2009 4:31 pm

pic identification

Post by Hellboy »

Hi all,
I have a question :
how to identify the programmable interrupt controler in my computer? is there any instruction for ?is it possible to handle all pic in the same way?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: pic identification

Post by Combuster »

By the powers of the PC standard, the PIC is omnipresent and a universal constant.

In all seriousness, each chipset has a PIC emulated somewhere, but as they all work by definition in the same way there is little reason to go checking off all possibilities.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
kop99
Member
Member
Posts: 120
Joined: Fri May 15, 2009 2:58 am

Re: pic identification

Post by kop99 »

if you are using intel cpu, then following is a little help.
http://www.thesatya.com/8259.html

And google about 8259.
User avatar
Masterkiller
Member
Member
Posts: 153
Joined: Sat May 05, 2007 6:20 pm

Re: pic identification

Post by Masterkiller »

Remap an interrupt IVT of interrupt of 0x08 (IRQ0 = programable interrupt controller called 18.2 per second); Mask the IRQ0 through PIC at port 0x21; Wait ~1sec, if no interrupt called continue executing as you have PIC, if interrupt called, your interrupt handler must tell the main execution that you do not have an PIC. Return 0x08 INT handler to its original value.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: pic identification

Post by Brendan »

Hi,
Masterkiller wrote:Remap an interrupt IVT of interrupt of 0x08 (IRQ0 = programable interrupt controller called 18.2 per second); Mask the IRQ0 through PIC at port 0x21; Wait ~1sec, if no interrupt called continue executing as you have PIC, if interrupt called, your interrupt handler must tell the main execution that you do not have an PIC. Return 0x08 INT handler to its original value.
If you can't be sure if there's PIC chips, then you can't be sure there's a PIT chip either (or that it boots an OS in any way you're used to)...

If there's no PIC then the computer isn't a "PC compatible" and you'd need to port your OS to the different architecture (even if the different architecture happens to use x86 CPUs).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply