Linux System Management for IO ports and IO memory

Source: Internet
Author: User
Tags linux

One, I/O ports

Port is the address of a register that can be accessed directly by the CPU in an interface circuit. Almost every peripheral is done by reading and writing registers on the device. The CPU sends commands to the registers in the interface circuit through these address ports, reading status and transmitting data. Peripheral registers, also known as "I/O ports", typically include three categories of control registers, state registers, and data registers, and the registers of a peripheral are usually continuously addressed.

Two, IO memory

For example, a graphics card can be plugged into a PC with 2MB of storage space and possibly even a ROM with executable code.

Three, IO port and IO memory distinction and connection

The difference between the two is related to hardware knowledge, X86 system, with two address space: IO Space and memory space, and RISC instruction system CPU (such as ARM, PowerPC, etc.) usually only achieve a physical address space, that is, memory space.

memory Space: memory address range, 32-bit operating system memory space of 2 of the 32 power, that is, 4G.

io Space: X86 unique space, with the memory space of each other independent address space, 32-bit X86 has 64K io space.

IO port: When register or memory is in IO space, it is called IO port. General registers are also commonly known as I/O ports, or I/Os ports, this I/O port can be mapped in memory space, can also be mapped in I/O space.

IO memory : When a register or memory is in memory space, it is called IO memory.

Four, peripheral IO port Physical Address of the method of addressing

There are two ways for the CPU to address the physical addresses of peripheral IO ports: One is I/O mapping (i/o-mapped) and the other is the memory-mapped method (memory-mapped). The exact one depends on the CPU architecture.

1, unified Address

The CPUs of the RISC instruction system (e.g., PowerPC, m68k, ARM, etc.) typically implement only one physical address space (RAM). In this case, the physical address of the peripheral I/O port is mapped to the CPU's single physical address space and becomes part of the memory. At this point, the CPU can access the peripheral I/O port as if it were accessing a memory unit without having to set up specialized peripheral I/O directives.

Unified address also known as "I/O Memory" mode, peripheral registers are located in "Memory Space" (many peripherals have their own memory, buffer, peripheral registers and memory collectively referred to as "I/O space").

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.