acessing pcie memory space on LS1043ARDB using u-boot commands

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

acessing pcie memory space on LS1043ARDB using u-boot commands

1,363 Views
douglasmcintosh
Contributor I

Hi,

We have a LS1043ARDB that we have hooked up to a custom end point connected to one of the pcie channels.

I can see on the u-boot splash screen that it dects the interface and reports the correct link speed. (x1 gen2).

Using the pci command, I can find the device at 4.0.0.

I can read the header information and even write to config space registers.

I have 3 Bars defined. One of which, bar1, is mapped directly to the pcie config space so I can use memory commands to view them. We do this on all of our custom interfaces to verify the connectivity.

The address in the Bar1 register is 0x40110000. But when I use the 'md' command to dump the space out, I see all zeroes.

This method works for all of the other boards that I have used.

We can take this custom endpoint and plug it into a PC running windows, and it discovers the device and also allows us to dump the memory out as we expect.

I am wondering if the ls1043ardb version of u-boot is different? Is there a virtual memory space that I need to map in? If I type 'pci regions', I get the following:

#  Bus Start                 Phys start                 Size                        Flags

0 0x00000000000000 0x00004000020000 0x0000000010000 io io

1 0x00000040000000 0x00004040000000 0x0000004000000 mem

2 0x00000080000000 0x00000080000000 0x000007be00000 mem sysmem

 

If I try to access the Phys Start area, I get an exception and reboot.

Using the bus-start addresses, I can access memory without exception, but all zeroes for the pcie space.

Thanks

Doug

Labels (1)
0 Kudos
2 Replies

1,334 Views
douglasmcintosh
Contributor I

Error

0 Kudos

1,353 Views
douglasmcintosh
Contributor I

I discovered the issue.

The LS1043ARM describes the memory map for the PCIe controllers up in high memory.

We are using pcie controller 3, so it is mapped to 0x50_0000_0000.

When I dump the memory using 0x50_4xxx_xxxx, I see the memory in the 3 different BARs.

the pci regions command was telling me it was mapped to 0x404xxxxxxx.

 

Doug

0 Kudos