>> That sounds like a job for me :) I guess a simple lookup table
>> will do... I'll work on it.
>
>That would be cool. There was an oddity, where the hard drive
>emulation code registers port numbers 0x1f0..0x1f7 one byte
>at a time. 0x1f0 is a word port. 0x1f1 is a byte port. Yet
>when you access 0x1f0, it needs to get the whole word.
>The current plugin code was splitting these accesses into 2.
>
>Perhaps if a device owns consecutive ports, pass accesses in
>larger quanta to the device, and let it split them up.
I can use a similar system to the linux page allocation system. Make three
arrays, one for one-byte allocations, one for two-byte allocations, and
one for four-byte allocations. When a dword is out'd or in'd we start at the
four-byte allocation array; if there is no four-byte allocation we split into
two two-byte allocations and look into the next array, etc.
I forgot (don't have the intel docs in front of me now), but IIRC 4-byte
in's/out's have to be aligned on a 4-byte boundary (in the I/O address space),
right ? Or am I confused ?
-- Ramon