博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
什么是I/O地址,I/O端口和I/O端口地址?
阅读量:2029 次
发布时间:2019-04-28

本文共 7554 字,大约阅读时间需要 25 分钟。

Table of Contents


Input/output port

An input/output port may refer to any of the following:

1. Alternatively referred to as I/O addressI/O port, and I/O port address, the input/output port is a  address used by  to communicate with  on your computer. In your computer there are 65,535 memory ports that are numbered from 0000h to FFFFh.

The I/O port assignment can be made either manually using  or automatically using . When configuring a devices I/O port, it's important that it does not share the same port as another device or you a hardware conflict occurs.

How can I view my computers input/output addresses?

To view the computer I/O addresses in Windows, , click View at the top of the Device Manager window, click Resources by type, and then select Input/Output (IO). You will see output similar to the picture shown below.

输入输出端口

输入/输出端口可能是指以下任何一项:

1.输入/输出端口也称为I / O地址,I / O端口和I / O端口地址,是软件用来与计算机上的硬件通信的内存地址。 您的计算机中有65,535个内存端口,编号从0000h到FFFFh。

可以使用DIP开关手动进行I / O端口分配,也可以使用PnP自动进行I / O端口分配。 配置设备的I / O端口时,重要的是不要与另一个设备共享同一端口,否则会发生硬件冲突。

如何查看计算机的输入/输出地址?

要在Windows中查看计算机的I / O地址,请打开``设备管理器'',单击``设备管理器''窗口顶部的``查看'',单击``按类型划分的资源'',然后选择``输入/输出(IO)''。 您将看到类似于下图的输出。

I/O port

(1) (Input/Output port) An I/O port is a socket on a computer that a cable is plugged into. The port connects the CPU to a peripheral device via a hardware interface or to the network via a network interface. See , , ,  and .

(2) (Input/Output port) In a PC, an I/O port is an address used to transfer data. See .

(1)(输入/输出端口)I / O端口是计算机上插入电缆的插座。 该端口通过硬件接口将CPU连接到外围设备,或者通过网络接口将CPU连接到网络。 请参阅端口,标准-硬件接口,DisplayPort,HDMI和USB。

(2)(输入/输出端口)在PC中,I / O端口是用于传输数据的地址。 请参阅PC I / O寻址。

PC I/O addressing

The method used to pass signals from the CPU to the controller boards of peripheral devices on x86 machines. An I/O address, also called a "port address," references a separate memory space on PC peripheral boards, a little bit similar to memory-mapped peripherals that use blocks of memory. Peripherals often use both methods: an I/O address for passing control signals and memory for transferring data.

用于将信号从CPU传递到x86机器上外围设备的控制器板上的方法。 I / O地址也称为“端口地址”,它引用PC外围板上的单独存储空间,与使用内存块的映射内存的外围设备有点相似。 外围设备经常使用两种方法:用于传递控制信号的I / O地址和用于传输数据的存储器。

Tiny Scattered Memory Banks微小的分散存储库

There is a 64K address space for I/O addresses, although typically less than 1K is used. Each board that uses an I/O address contains a few bytes of memory (16, 32, etc.) set to a default address range. One or more alternate addresses is also provided to resolve conflicts with other boards. These I/O spaces are a bunch of tiny memory banks scattered over different devices. As long as each one is set to a different address, the CPU can transmit signals to the appropriate boards without conflict.

微小的分散存储库

尽管通常使用小于1K的空间,但I / O地址有64K的地址空间。 每个使用I / O地址的电路板都包含几个字节的内存(16、32等),它们设置为默认地址范围。 还提供一个或多个备用地址来解决与其他板的冲突。 这些I / O空间是一堆分散在不同设备上的微型存储库。 只要将每个地址设置为不同的地址,CPU即可将信号发送到适当的板而不会发生冲突。

The I/O Address OperationI / O地址操作

If a program needs to send a byte to the serial port, it issues an OUT instruction to the CPU with the address of that serial port. The CPU notifies the address bus to activate the I/O space, not regular memory, and the address bus signals the appropriate byte location on the board. The CPU then sends the data character over the data bus to that memory location. Following are the default I/O addresses for the serial and parallel ports in a PC. See .

I / O地址操作

如果程序需要向串行端口发送一个字节,则它将使用该串行端口的地址向CPU发出OUT指令。 CPU通知地址总线以激活I / O空间,而不是常规存储器,并且地址总线以信号通知板上的适当字节位置。 然后,CPU通过数据总线将数据字符发送到该存储位置。 以下是PC中串行和并行端口的默认I / O地址。 请参阅即插即用。

Port PC PS/2
COM1 3F8h  
COM2 2F8h  
COM3 2E8h  
COM4 2E0h  
LPT1 378h 3BCh
LPT2 278h 378h
LPT3 3BCh 278h

I/O Ports

An I/O port is usually used as a technical term for a specific address on the x86's IO bus. This bus provides communication with devices in a fixed order and size, and was used as an alternative to memory access. On many other architectures, there is no predefined bus for such communication and all communication with hardware is done via memory-mapped IO. This also increasingly happens on modern x86 hardware.

I / O端口通常用作x86 IO总线上特定地址的技术术语。 该总线以固定的顺序和大小提供与设备的通信,并被用作内存访问的替代方法。 在许多其他体系结构上,没有用于此类通信的预定义总线,并且与硬件的所有通信都是通过内存映射的IO完成的。 这在现代x86硬件上也越来越多地发生。

Contents

 [] 

Looking for a list of ports

As an operating system developer, you should not be looking for this. There are few devices[which?] that are fairly consistent on PC based hardware, but most ports are claimed by plugin cards[which?] you might not have and some[which?] are even assigned via PNP which means that any port could be used for the device in question. If you want access to a device, you will need to look up the details for the device in question, and if some fixed port is involved, it will tell you. It is not technically feasible to have a complete mapping of ports to devices as you won't get access to it.

作为操作系统开发人员,您不应该寻找这个。 在基于PC的硬件上几乎没有什么设备[哪个?]相当一致,但是大多数端口是由插件卡声明的[您可能没有?],有些[哪个?]甚至通过PNP分配,这意味着任何端口都可以 用于有问题的设备。 如果要访问设备,则需要查找有关设备的详细信息,并且如果涉及某个固定端口,它将告诉您。 从端口到设备的完整映射在技术上不可行,因为您将无法访问它。

Port abuse滥用

A few devices[which?] were made cheap and do not decode all address bits of the I/O port in question (only the bottom 12 or 14). That means that there are up to sixteen port addresses mapping to the same device. Similarly, some devices have chosen to avoid conflict with such devices by using a sparse register file. The bottom bits would be defined as constant, and the top bits would instead be used for the index. You would get ports number 0x82E8, 0x84E8, 0x86E8 and so on. Such ISA devices are typically prone to interfering with  assigned IO addresses due to their spread.

Modern implementations of old devices (typically IDE and VGA controllers) have an implementation that is mentioned to be plug-and-play with moving registers, but they are still able to listen to legacy ports and respond accordingly.

一些设备价格便宜,并且无法解码所讨论的I / O端口的所有地址位(仅对底部12或14)。 这意味着最多有十六个端口地址映射到同一设备。 同样,某些设备已选择使用稀疏寄存器文件来避免与此类设备发生冲突。 最低位将被定义为常量,而最高位将被用作索引。 您将获得端口号0x82E8、0x84E8、0x86E8等。 由于此类ISA设备的扩散,它们通常容易干扰PCI分配的IO地址。

旧设备的现代实现(通常是IDE和VGA控制器)具有一种可移动寄存器即插即用的实现,但它们仍能够侦听旧端口并做出相应响应。

The list

If you have found a port number and you are still wondering what it's meant to do, here's a list of the most common ports:

Port range Summary
0x0000-0x001F The first legacy , often used for transfers to floppies.第一个传统的DMA控制器,通常用于传输到软盘。
0x0020-0x0021 The first 
0x0022-0x0023 Access to the Model-Specific Registers of Cyrix processors.访问Cyrix处理器的特定于模型的寄存器。
0x0040-0x0047 The  (Programmable Interval Timer)PIT(可编程间隔计时器)
0x0060-0x0064 The  or its predecessors, dealing with keyboards and mice.“ 8042” PS / 2控制器或其前身,用于处理键盘和鼠标
0x0070-0x0071 The  and  registers,CMOS和RTC寄存器
0x0080-0x008F The  (Page registers)
0x0092 The location of the fast  gate register快速A20门寄存器的位置
0x00A0-0x00A1 The second 
0x00C0-0x00DF The second  controller, often used for soundblasters
0x00E9 Home of the . Used on some emulators to directly send text to the hosts' console.
0x0170-0x0177 The secondary  harddisk controller.
0x01F0-0x01F7 The primary  harddisk controller.
0x0278-0x027A Parallel port
0x02F8-0x02FF Second 
0x03B0-0x03DF The range used for the , its direct predecessors, as well as any modern video card in legacy mode.
0x03F0-0x03F7
0x03F8-0x03FF First 

See Also


cpu怎样访问外设存储空间?

  1. 一种方式,cpu用单独的指令访问,这个单独的指令需要一个要操作的外设存储空间的地址,这就是I/O端口(I/O port)。
  2. 另一种方式,cpu不用单独的指令访问外设存储空间,用通常的访问存储器的方式访问外设存储空间,这就是I/O存储器(memory-mapped)。

memory比port好在它不是固定大小的,只受系统配置的常规存储器大小和系统地址空间大小的限制。port的空间是固定的,现在有些外设的存储空间要求很大,port的局限性就显现出来了,因此,现在的观点是用memory-mapped的外设存储空间。

 

转载地址:http://zypaf.baihongyu.com/

你可能感兴趣的文章
【Java】【29】post,get通用方法加强
查看>>
【基础知识】【2】注释
查看>>
【服务器】【Windows】【6】把tomcat7添加到windows服务中
查看>>
【JS】【27】在特定的位置添加元素
查看>>
【其他】【开发软件】【1】开发软件
查看>>
【JS】【26】把字符串转换为日期
查看>>
【cmd】【3】查看jdk安装路径
查看>>
【JS】【28】让输入框只能输入正整数
查看>>
【记录】【4】各种工具
查看>>
【cmd】【4】ping IP或者域名,看是否能连通
查看>>
【Java】【30】数据基本类型的转换
查看>>
【Mybatis】【9】ResultMap支持继承
查看>>
【Oracle】【22】in、exists、not in、not exists
查看>>
【Mybatis】【10】foreach 批量操作
查看>>
【Git】【2】切换分支
查看>>
【Java】【31】去掉字符串中的html标签
查看>>
【JS】【30】各种正则
查看>>
【cmd】【5】检查开启了哪些端口,及特定的端口是否开启
查看>>
【其他】【PL/SQL Developer】【3】对比两个数据库的表差异
查看>>
【HTML&CSS】【7】网址栏左侧出现的图标Icon
查看>>