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.

[参考译文] SK-AM69:SK-AM69:AM69 上的 PCIe 地址范围

Guru**** 2694555 points

Other Parts Discussed in Thread: AM69

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1597417/sk-am69-sk-am69-pcie-address-ranges-on-am69

器件型号: SK-AM69
Thread 中讨论的其他器件: AM69

从以下位置继续:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1475274/sk-am69-pcie-address-ranges-on-am69

对延迟的响应表示歉意、现在再看一下。

现在我可以看到您提到的更新内核中包含的补丁、AM69 现在可以支持需要大 32 位不可预取 BAR(接近 4GB)的器件:

ranges = <0x01000000 0x00 0x00001000 0x40 0x00001000 0x00 0x00100000>, /* IO (1 MB) */ 

         <0x02000000 0x00 0x00101000 0x40 0x00101000 0x00 0xffeff000>; /* 32-bit Non-Prefetchable MEM (4 GB - 1 MB - 4 KB) */

这是伟大的,但什么设备的 64 位可预取条?
如果我将此地址区域分为 3 个区域:

I/O 1MB

32 位非预取 2GB - 1MB - 4KB

64 位预取 2GB

硬件是否支持此功能?

我认为 Cadence IP 和上游 Linux 驱动程序应该支持这一点、我可以在使用 Cadence IP(但不是 TI 器件)的另一个 SoC 中看到更标准的设置。下面是来自器件树 PCIe 节点的“范围“条目:

 ranges = <0x01000000 0x0  0x00000000  0x48 0x10000000  0x0 0x00200000>, /* IO */
          <0x42000000 0x0  0x10000000  0x0  0x10000000  0x0 0x04000000>, /* 32bit Prefetchable */
          <0x02000000 0x0  0x14000000  0x0  0x14000000  0x0 0x04000000>, /* 32bit */
          <0x43000000 0x4a 0x00000000  0x4a 0x00000000  0x2 0x00000000>, /* 64bit */
          <0x03000000 0x49 0x00000000  0x49 0x00000000  0x1 0x00000000>; /* 64bit Prefetchable */

所有基底都已覆盖、因此所有设备都应枚举它们是否适合分配的大小。

 

 

 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Neil、

    应可以定义不同的范围。

    此致、

    Takuma

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    不错、它有效:

    补丁(目前刚刚开发了 PCIe2):

    diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
    index 9cc0901d58fb..c1df31d33f99 100644
    --- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
    @@ -1120,11 +1120,12 @@ pcie1_rc: pcie@2910000 {
             vendor-id = <0x104c>;
             device-id = <0xb012>;
             msi-map = <0x0 &gic_its 0x10000 0x10000>;
             dma-coherent;
             ranges = <0x01000000 0x00 0x00001000 0x41 0x00001000 0x00 0x00100000>, /* IO (1 MB) */
    -             <0x02000000 0x00 0x00101000 0x41 0x00101000 0x00 0xffeff000>; /* 32-bit Non-Prefetchable MEM (4 GB - 1 MB - 4 KB) */
    +             <0x02000000 0x00 0x00101000 0x41 0x00101000 0x00 0x7feff000>, /* 32-bit Non-Prefetchable MEM (2 GB - 1 MB - 4 KB) */
    +             <0x43000000 0x00 0x80000000 0x41 0x80000000 0x00 0x80000000>; /* 64-bit Prefetchable MEM (2 GB) */
             dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
             status = "disabled";
         };
     
         serdes_wiz0: wiz@5060000 {

    这将得出:

    [    3.035198] j721e-pcie 2910000.pcie: host bridge /bus@100000/pcie@2910000 ranges:
    [    3.042689] j721e-pcie 2910000.pcie:       IO 0x4100001000..0x4100100fff -> 0x0000001000
    [    3.050780] j721e-pcie 2910000.pcie:      MEM 0x4100101000..0x417fffffff -> 0x0000101000
    [    3.058863] j721e-pcie 2910000.pcie:      MEM 0x4180000000..0x41ffffffff -> 0x0080000000
    [    3.066948] j721e-pcie 2910000.pcie:   IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000

    现在、我的 64 位 bar 会枚举:

    0001:01:00.0 Processing accelerators: Blaize, Inc Xplorer X1600 (rev 01)
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 255
        Region 0: Memory at 4180000000 (64-bit, prefetchable) [disabled] [size=512M]
        Region 2: Memory at 4101000000 (32-bit, non-prefetchable) [disabled] [size=16M]
        Region 3: Memory at 4100800000 (32-bit, non-prefetchable) [disabled] [size=4M]

    每个 PCIe 控制器的限制是 4GB、还是我们可以更大? 我有一台容量为 8GB 的 BAR0 设备、因此需要大于 8GB 才能放入。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Neil、

    4GB 将成为限制。

    此致、

    Takuma