Controlling offset into peripheral memory on T1024

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Controlling offset into peripheral memory on T1024

647 Views
maxruttenberg
Contributor I

Suppose I have a peripheral device (connected with PCIe) that has 32GB of memory on it, and the device wishes to make all 32GB available to Linux. I can see that there's a limitation with the amount of IO memory made available at boot to any given PCI controller (examining /proc/iomem it looks like 256MB). 

What's the most effective way of getting around this problem? The T1024RM describes LAWs and ATMUs and my first thought was to try the following:

  1. setup an extra LAW for an unused chunk of the memory space
  2. setup an extra outbound window register set with the base address register beginning at this new LAW and then control access into my peripherals address space by editing the translation address registers. 

When I try this though, and then attempt to read from the physical address that I had set using the LAW, which is the same value to which I had set the outbound window's base address, I get a bus error. 

Is there a step that I am missing here?

Labels (1)
0 Kudos
4 Replies

519 Views
r8070z
NXP Employee
NXP Employee

I am sure that LAW (1), outbound PCIe window (2), PCIe controller (3) configurations is enough for access to memory of the properly configured PCIe device (4) at suitable physical address (5). So there is can be misconfiguration in any of these five. Notice also that the PCIe LAW has to be in accordance to other LAWs. I.e. there should not be overlapping with other LAW which has higher priority.

0 Kudos

519 Views
r8070z
NXP Employee
NXP Employee

It is not quite clear do you write Linux device driver or software for a bare-metal system or something else.

0 Kudos

519 Views
maxruttenberg
Contributor I

r8070z‌ I guess what I'd really like to know is if a device requests X amount of memory in BARn, and the PCIe controller assigns BARn to a region of designated IO memory, so I guess by default (C00000000 + some offset) - (C0000000 + some offset + size of BARn), can a driver edit the outbound window in the ATMU to access memory beyond this region requested by BARn, provided of course that the device on the other end will let it.

0 Kudos

519 Views
maxruttenberg
Contributor I

I'd be writing with a Linux driver.

0 Kudos