Getting IO Base ports using PCI
Getting IO Base ports using PCI
Hi,
While I was trying to get the base IO port for the ne2000 in qemu (I found it later to be 0xc100 using Solar OS) in Ralf Browns interrupt list http://www.delorie.com/djgpp/doc/rbinter/it/82/8.html
I noticed it says
"bits 31-2 of base I/O port"
now this might sound like a stupid question but...
What about bits 0 and 1?? where does it say what value they should be?
thanks
Lon
While I was trying to get the base IO port for the ne2000 in qemu (I found it later to be 0xc100 using Solar OS) in Ralf Browns interrupt list http://www.delorie.com/djgpp/doc/rbinter/it/82/8.html
I noticed it says
"bits 31-2 of base I/O port"
now this might sound like a stupid question but...
What about bits 0 and 1?? where does it say what value they should be?
thanks
Lon
Re:Getting IO Base ports using PCI
Check out the document here: [Link Deleted!]
Chapter 6 explains it pretty well.
Chapter 6 explains it pretty well.
Re:Getting IO Base ports using PCI
wow thats got loads more info in it than the spec I've been working off, thanks!
Lon
Lon
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Getting IO Base ports using PCI
After reading the Wiki, I have since deleted the link. I had no idea that the document isn't freely available.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Getting IO Base ports using PCI
np. btw, i updated the wiki with informations about decoding BARs (based on clicker's code and SIGOPS documents)
Re:Getting IO Base ports using PCI
SolarOS has pretty explanatory code, albeit, not so well documented, on PCI enumeration. Combine Bogdan's code with chapter 6 and you will get the gest of what is going on. Look in the PCI directory of SolarOS...
Re:Getting IO Base ports using PCI
Erm yer SolarOS , thats made in pure ASM isnt it.. bit scary for a C hacker like myself
The wiki has definately proved helpful although tis certainly quite a bit of work just to get a port address! but oh well
The wiki has definately proved helpful although tis certainly quite a bit of work just to get a port address! but oh well
Re:Getting IO Base ports using PCI
You know what they say, "...nothings for free." ;D Seriously though, if you have the time, it is worth studying his code to understand it as it is pretty straight forward. You'll want to know ASM if you intend on OS programming too as somethings are coded in ASM for the sheer speed. The more proficient you are the less time it will take. It is that leanring curve which takes time.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Getting IO Base ports using PCI
geezer has PCI code in C. You can find some in Clicker (src/mod/io/pci) and The Mobius aswell.