This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to configure NETRA to a pcie64 EP device?

Hello,

NETRA is configured to a EP device in our i7 system.

i configured NETRA to pcie32 by setting MBOOT [01000], i can write and read NETRA's memory.

but, when i configured NETRA to pcie64 by setting MBOOT [01001], i can not write and read NETRA's memory(write 0xaaaaaaaa and 0x55555555 then read 0xffffffff).

details:

NETRA, a pcie64 EP device, has 3 64-bit bars: bar0-bar1(4K)\bar2-bar3(8M)\bar4-bar5(64M)

 

            /* use IB region0 to translate bar2-bar3(8M) */

            Bar_val = bar2 | (bar3 << 32)

                __raw_writel(0, PCI_REGV(IB_BAR(0)));

                __raw_writel((u32)(bar_val & 0xffffffff), PCI_REGV(IB_START_LO(0)));

                __raw_writel((u32)(bar_val >> 32), PCI_REGV(IB_START_HI(0)));

                __raw_writel(0x40400000, PCI_REGV(IB_OFFSET(0)));

                __raw_writel(2, PCI_REGV(IB_BAR(0)));

 

            /* Enable inbound translation */

            val = __raw_readl(PCI_REGV(CMD_STATUS));

            val |= IB_XLAT_EN_VAL;

            __raw_writel(val, PCI_REGV(CMD_STATUS));

 

NETRA PCI INFO:

[   24.535416] pci 0000:02:00.0: BAR Configuration -

[   24.535417]     Start        |       Length  |       Flags

[   24.535420] pci 0000:02:00.0:        0x00000000f7b00000      |       0x0000000000001000      |       0x0000000000140204

[   24.535424] pci 0000:02:00.0:        0x00000000f4000000      |       0x0000000000800000      |       0x000000000014220c

[   24.535427] pci 0000:02:00.0:        0x00000000f0000000      |       0x0000000004000000      |       0x000000000014220c

[   24.535490] pci 0000:02:00.0: TI816X registers mapped to 0xffffc9000067e000

02:00.0 Class 0000: Device 104c:b800 (rev 01)

        Flags: bus master, fast devsel, latency 0, IRQ 16

        Memory at f7b00000 (64-bit, non-prefetchable) [size=4K]                   bar0-bar1

        Memory at f4000000 (64-bit, prefetchable) [size=8M]             this is bar2-bar3

        Memory at f0000000 (64-bit, prefetchable) [size=64M]                       bar4-bar5

        Capabilities: [40] Power Management version 3

        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+

        Capabilities: [70] Express Endpoint, MSI 00

        Capabilities: [100] Advanced Error Reporting

 

i test the i7 VGA deivce, i can write and read its memory.

i7 VGA deivce PCI INFO:

00:02.0 Class 0300: Device 8086:0116 (rev 09)

        Subsystem: Device 8086:2010

        Flags: bus master, fast devsel, latency 0, IRQ 11

        Memory at f7400000 (64-bit, non-prefetchable) [size=4M]

        Memory at e0000000 (64-bit, prefetchable) [size=256M]

        I/O ports at f000 [size=64]

        Expansion ROM at <unassigned> [disabled]

        Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-

        Capabilities: [d0] Power Management version 2

        Capabilities: [a4] PCI Advanced Features

 

question:

How to configure NETRA to a pcie64 EP device?