在 x86 架构中,我们对 I/O 映射 I/O 使用 I/O 指令,如 IN 和 OUT。据我所知,我们在内存映射 I/O 中使用像 MOV 这样的内存指令。这一切都很好,但谁来决定使用哪种 I/O 方法?如果我想建立自己的设备(一个外设),我可以自由选择使用 I/O 映射或内存映射 I/O 与 PC 通信吗?还是所有设备都必须支持两者?
无法理解谁决定用于与设备通信的 I/O 方法。
As I know it, this is a simplified view of PC bus system (it excludes the bridges I'm aware of it).
and we have an address space of 65536 bytes (0000-FFFF) in modern x86 CPUs as far as I know. These are I/O addresses. In x86 IN and OUT instructions are used to communicate with devices through I/O ports.
Considering PCs (x86 cpus) the following are my questions:
Can I add a device to this I/O …