PCI bar space prefetch and non-prefetch

Source: Internet
Author: User
Tags prefetch

PCI bar space is divided into two types: ioresource_io (non-prefetch) and ioresource_mem (pre-Fetch). Generally, the bar space must be set to ioresource_io. For bar space, to set it to ioresource_mem;

 

So why do we need to distinguish between two types of space?

The so-called prefetch focuses on the word "Fetch", which depends on the difference between reading Io registers and RAM memory.

 

 

 

Ldd3

 

If the memory area is identified as prefetch, the CPU can cache its content and optimize it for all types. non-prefetchable memory access, on the other hand, cannot be optimized because each access may have a marginal effect,
It is like an I/O port. peripherals that map their registers to a memory address range declare that this range is non-prefetch, while some video memory such as the PCI board can be prefetch.

 

Web Search

 

In some applications, we will encounter"Prefetch"Memory concept,PrefetchSex refers to the storage spacePrefetchCapability. If the read operation has no side effects (that is, reading data from Ram does not damage the data), it is called the memory space.Prefetch. If necessary, the byte write operation can be combined into a dual-word write operation.PrefetchThe read address and storage status will not be changed once. The CPU can cache its content and optimize it for all types ,.Non-Prefetch"The memory is similar to the first-in-memory address. After reading data, the first-in-first-out pointer changes. in addition, I/O in the interrupt state is also reflected in the memory. After reading this memory, the interrupt mark may be cleared, and so on. Therefore, the CPU cannot cache this memory address.

 

 

64h16 datasheet register Definitions

 

 

Hwinit

RC

 

In the Embedded ARM processor, there is no special Io read instruction, but the access register is read and written by the memory. Therefore, there is still a memory ing IO Device in the PCI space,
Different Features of PCI prefetch memory device and memory ing IO Device:

Prefetch memory device features:
1) Multiple reads and writes generate the same data;
2) bytes can be merged in the forwarding write buffer;

For memory ing I/O devices, none of the above two features apply, because:
1) For some status registers, reading may cause the status bit to be cleared; for FIFO, reading the header data will cause the subsequent data to be automatically moved;
2) bytes cannot be merged in the forwarding buffer of the bridge chip;

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.