How do you access I/O ports in 32 bit protected mode?

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
madmatt

How do you access I/O ports in 32 bit protected mode?

Post by madmatt »

How would you access I/O ports in protected mode? I've read that you would need a TSS selector setup with and I/O bitmap set to all 1's or something like that.  How would you go about setting this up?
thanx
Matt
common

RE:How do you access I/O ports in 32 bit protected mode?

Post by common »

You could either do that (you'll need to read the Intel documents about TSS, they're quite lengthy)...or, the easier way, just set IOPL in the EFLAGS of the process to match its CPL.
Post Reply