How to set Prefetchable Memory Range
The PCIe interface is a widely used technology today, but it is a bit difficult to understand from the PCIe Specification alone, so this column will explain topics extracted from the specification.
This time, I will explain how to set the Prefetchable Memory Range in the Type1 Configuration Space Header. To set the Prefetchable Memory Range, use the following Register of Type1 Configuration Space Header
・Prefetchable Memory Base
・Prefetchable Memory Limit
・Prefetchable Memory Base Upper 32 Bits
・Prefetchable Memory Limit Upper 32 Bits
These four Registers are used to set Memory Rage, which determines whether a Bridge Device, such as a PCIe Switch, will pass received Memory Transactions.
If the Memory Transaction is within the Memory Range set in Register, that Memory Transaction will be passed, but if it is outside the Memory Range, that Memory Transaction will not be passed.
Role of Registers
The role of each Register is as follows.
・Prefetchable Memory Base Register and Prefetchable Memory Limit Register are 16bits,
Prefetchable Memory Base Upper 32 Bits Register and
Prefetchable Memory Limit Upper 32 Bits Register is 32bits,
Prefetchable Memory Range consists of 64bits.
・Prefetchable Memory Base Register and Prefetchable Memory Base Upper 32 Bits Register are
Set the start address of the Prefetchable Memory Range and set the Prefetchable Memory Limit Register
Prefetchable Memory Limit Upper 32 Bits Register is Prefetchable Memory Range
Set the end address of
・The upper 12 bits of the Prefetchable Memory Base Register are the Prefetchable Memory Range
Start address [31:20], Prefetchable Memory Base Upper 32 Bits Register is
It will be the start address [63:32] of the Prefetchable Memory Range.
・Higher 12 bits of Prefetchable Memory Limit Register are used for Prefetchable Memory Range.
End address [31:20], Prefetchable Memory Base Upper 32 Bits Register is
End address [63:32] of Prefetchable Memory Range.
・The lower 20 bits of the start address of the Prefetchable Memory Range are fixed at 0x00.
The lower 20 bits of the end address are fixed at 0xFF.
Specific example of setting method
We will use a specific example to explain what values should be set. Please check the PCIe Specification for detailed specifications.
To set the Prefetchable Memory Range through Memory Transaction to the range of 1_8000_0000h - 1_84FF_FFFFh, set Register as follows.
With the above register settings, the Memory Range of 1_8000_0000h - 1_84FF_FFFFh can be set.
Inquiry
If you have any questions regarding this article, please contact us below.