[Reprinted] To understand registers, memory, Io space, IO port, Io memory

Source: Internet
Author: User

What are the relationships between memory, registers, and ports? What are the differences between them? Do you know them?

 

1. Differences between registers and memory

Both registers and memory can be used for reading and writing, but register operations have side effects)

Reading a register may change the content in the register. For example, in some device interrupt status registers, the registers are automatically cleared after being read.

 

Second, I/O space and memory space

Not all architectures have the definition of I/O space. I only know x86 systems, but ARM architecture does not,

On x86, the I/O space and memory are independent. They each have their own bus, and the I/O space is usually 64 KB, that is, 16 bits, and the memory space is 4 GB.

The difference is that

 

Third, I/O port and I/O memory

With the concept of I/O space, I/O Ports and I/O memory are available.

When a register or memory is in the IO space, it is called an IO port.

When a register or memory is in the memory space, it is called Io memory.

This ing maps virtual addresses to physical addresses through the mmu of the OS.

 

I may not understand this explanation. It may be better to look at the figure below.

When you are wondering why pointers can be reduced but cannot be added, you may understand page table ing!

 

For differences between the two in Linux driver development, refer to the following article.

Http://www.360doc.com/content/10/1011/07/1317564_60018145.shtml

 

Article Source: http://blog.csdn.net/seanyxie/article/details/5946219

[Reprinted] To understand registers, memory, Io space, IO port, Io memory

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.