AGP、PCMCIA、Xillybus 与 FPGA 接口

AGP、PCMCIA、Xillybus 与 FPGA 接口

1. AGP

agp/实现旧式Accelerated Graphics Port/GART:

  • aperture分配;
  • GATT;
  • bridge probe;
  • bind/unbind pages;
  • Intel/AMD/VIA/NVIDIA等chipset。

它不是现代DRM GEM/TTM或IOMMU通用接口。RK3588 Mali GPU不使用AGP。

2. PCMCIA

pcmcia/包含PC Card function driver,例如:

  • synchronous serial;
  • smart card;
    -其它legacy通信卡。

它依赖PCMCIA socket/Core和card services。RK3588常见板没有PCMCIA。

3. Xillybus架构

Xillybus把FPGA endpoint中的逻辑stream映射为字符设备:

1
2
3
4
5
userspace read/write
-> xillybus channel
-> DMA/buffer descriptors
-> PCIe/OF/USB transport
-> FPGA logic

Core和transport分离:

  • class:minor和device node;
  • core:channel、buffer、read/write/poll;
  • PCIe/OF/USB:底层I/O和IRQ。

4. Xillybus Open

Channel可配置:

  • host-to-FPGA或FPGA-to-host;
  • seekable/nonseekable;
  • synchronous/asynchronous;
  • buffer size/count;
  • exclusive open。

Endpoint提供的channel metadata控制device创建,必须验证数量、name和buffer参数。

5. 数据路径

Write:

1
2
3
4
5
wait free buffer
-> copy user data
-> mark ready
-> notify FPGA
-> completion/IRQ frees buffer

Read:

1
2
3
4
wait FPGA-filled buffer
-> copy to user
-> recycle
-> notify endpoint

Poll和fasync按buffer状态通知。

6. Remove

PCIe/USB/OF transport remove时要:

  • 停止IRQ/DMA;
  • 标记channels offline;
  • 唤醒所有read/write;
  • 删除device nodes;
  • 等open引用;
  • 释放buffers。

FPGA重配置也可能让endpoint逻辑消失,应按hot remove处理。

7. Xilinx HWICAP

xilinx_hwicap/通过ICAP让MicroBlaze系统重配置FPGA。它可写bitstream/configuration frame,权限错误可能使系统立即失效。

这不是RK3588外接FPGA的标准加载路径;现代系统优先使用FPGA manager framework。

8. 安全

FPGA字符通道可能直接连DMA或控制逻辑:

  • 验证endpoint描述;
  • 限制node权限;
  • IOMMU隔离PCIe DMA;
  • bitstream签名;
  • reset/reconfigure期间阻止I/O;
  • 不信任FPGA返回长度;
  • 防止channel name注入udev路径。

9. RK3588可能性

RK3588若PCIe/USB连接Xillybus兼容FPGA,理论上可使用对应transport,但主要defconfig未显式启用Xillybus。必须确认:

  • endpoint固件;
  • Kconfig;
  • PCI ID/DT compatible;
  • DMA mask和IOMMU;
  • PCIe link;
  • device node策略。

源码存在不代表板载FPGA自动适用。

文章互动

阅读 --

留言

0 条留言

正在加载留言…