Lars Erdmann answered Robert:
> No. For "IN" and "OUT" (and also "INS" and "OUTS") the Intel spec only
> allows either DX or an 8-bit immediate value to specify the port number.
> You must have been doing magic.
:)
Yes, seems Robert meant the PCI-configuration access rules...
in opposition to the 16-bit PCI I/O-ports (0cf8,0cfc) which are 32 bit
wide from the data-bus aspect, most PCI-registers are memory-mapped-I/O
anyway, so you must use EAX,DX registers with a set MSBit to access
the PCI-configuration space.
MOV dx,0cf8
MOV eax,8xxx_xxxx ;have MSBit set
OUT dx,eax ;set bus, device and offset at once
;followed by IN/OUT 0cfc (many locations work with 32 bit rd/wr only)
But after knowing that a PCI-device is found in the MMIO-space, you
can use any register with all available addressing formats to RD/WR
as if they were just ordinary memory (let aside W1C and friends yet),
even you better read/write always aligned 32-bits at once.
The BIOS should really know enough about its own hardware to correct
set MMIO-space to UC. As long the OS wont corrupt the MTTR-setting...
Could your reported problem be just caused by the used debugger ?
I once had to modify mine to always read aligned 32-bit junks to see
the correct contents of any PCI-memory, bytewise read showed garbage.
>>> access decoding). They also have their advantages: there
>>> is none of those caching problems (speculative reads etc.),
>>> writes are immediately executed across PCI bridges (where
>>> memory mapped registers have their issues as writes end
>>> up in posting buffers, another kind of caching issue to
>>> be taken into account). The problem is, there exist only
>>> 65536 I/O ports that need to be shared all across the system
>>> (every device, plus legacy I/O ports).
Yes, and 8-bit legacy ports are awful slow (RTCL,KEYBD,COMx,LPTn)~1MHz,
while their memory-mapped aliases (if available) allow faster response.
Seems that IDE and SATA IO-ports (32-bit wide) are quite faster(>20MHz).
Memory mapped I/Os could be slow as well, it just depends on hardware.
>> I don't think so ... it has been awhile, but I distinctly
>> remember setting the high bit of EDX to access a PCI device.
>> So I infer all 32 bits are available for IO addressing.
Unfortunately (or for the better) IO-space remain limited to 16bit.
__
wolfgang