pci enumeration

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.
Ozguxxx

Re:pci enumeration

Post by Ozguxxx »

Hey everybody, glad to be back after a long time. I have lost track of os code and development, I cannot understand some parts of it now... ??? Hopefully I will manage it. Anyway...

I am trying to run interrupt 0x1a with ax=0xb101 to check if pci bios is present, in real mode thta is working alright but in wirtual 8086 mode Im getting some kind of problem I think thats because of 32 bit bios code or something that I do not handle in gpf handler. Since I cannot understand the code right now I cannot send any kind of info about error. (I know this is stupid ;D) Anyway Im sure gurus have some idea about this 32 bit bios thing, so anything is appreciated, I have started digging intel manuals but I dont know if I will get any use out of them. Thanx in advance.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:pci enumeration

Post by Pype.Clicker »

well, actually, there is little chance your BIOS is trying to do anything 32bits (don't expect it to switch to pmode, for instance)... However, chances are good that it's trying to do something priviledged like CLI'ing, STI'ing, IRET'ing, IN/OUT'ing, etc. All those stuff require support from the GPF handler ... or tweaking with virtual mode extensions (permission bitmaps, IOPL, VPI and other various stuff)
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:pci enumeration

Post by distantvoices »

Ozgunh, if I were you, I'd leave the pci32 bios - you have to scan for it in memory in protected mode - as a fall back option, and use the pci ports for querying and operating on the pci bus.

Access Method 1 as to be found in the wiki faq is very handy and works great on all major i386 platforms to be found nowadays.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:pci enumeration

Post by Pype.Clicker »

and if you're the VeryParanoid type, you may try to use BIOS32 to check the PCI mode to be used *is* mode 1 in the realmode part of your boot process :)
Post Reply