AvaotaA1全志T527开发板AMP异构计算资源划分

DSP 资源

Modulecacheable属性AddressSize地址映射说明
DSP IRAMnon-cacheable0x0002_0000 - 0x0002_FFFF64KBDSP通过外部总线访问
DSP DRAM0non-cacheable0x0003_0000 - 0x0003_7FFF32KBDSP通过外部总线访问
DSP DRAM1non-cacheable0x0003_8000 - 0x0003_FFFF32KBDSP通外部总线访问
DSP IRAMnon-cacheable0x0040_0000 - 0x0040_FFFF64KBDSP通过内部总线访问
DSP DRAM0non-cacheable0x0042_0000 - 0x0042_7FFF32KBDSP通过内部总线访问
DSP DRAM1non-cacheable0x0044_0000 - 0x0044_7FFF32KBDSP通过内部总线访问
DRAM SPACEnon-cacheable0x1000_0000 - 0x1FFF_FFFF256M对应DDRR的前256M空间(需要DSP输出ahb做地址重映射)
DSP IRAMcacheable0x2002_0000 - 0x2002_FFFF64KBDSP通过外部总线访问
DSP DRAM0cacheable0x2003_0000 - 0x2003_7FFF32KBDSP通过外部总线访问
DSP DRAM1cacheable0x2003_8000 - 0x2003_FFFF32KBDSP通过外部总线访问
DRAM SPACEcacheable0x3000_0000 - 0x3FFF_FFFF256M对应DDR的前256M空间(需要DSP输出ahb做地址重映射)
DRAM SPACEnon-cacheable0x4000_0000 - 0x7FFF_FFFF1GDRAM特殊映射
DRAM SPACEcacheable可配置0x8000_0000 - 0xBFFF_FFFF1G预留空间
DRAM SPACEcacheable0xC000_0000 - 0xFFFF_FFFF1G直接映射到DDR对应空间

由于DSP的cacheable空间大小只能按照你512MB去划分,而且跳转指令不能超过1G空间,因此对于SRAM、以及DRAM的空间,DSP存在多套地址映射,根据不同的地址段区分cacheable和non-cacheable。

DSP的local sram包括IRAM和DRAM0/1,放在DSP内部,其他主机可以通过DSP的总线接口对该RAM进行访问,而DSP可以通过特定地址(0x0040_0000 - 0x0044_FFFF)对其直接访问,实现最高效率。

RV资源

Modulecacheable属性AddressSize地址映射说明
DSP IRAMnon-cacheable0x0002_0000 - 0x0002_FFFF64KB
DSP DRAM0non-cacheable0x0003_0000 - 0x0003_7FFF32KB
DSP DRAM1non-cacheable0x0003_8000 - 0x0003_FFFF32KB
SRAM A2non-cacheable0x0004_0000 - 0x0006_3FFF16+128KB系统外设
其他non-cacheable0x0800_0000 - 0x3FEF_FFFF与CPUX memory mapping一致
SRAM SPACE00x3FF0_0000 - 0x3FFF_FFFF1MB(实际使用256KB)0x3FF0_0000 - 0x3FFB_FFFF在总线上被屏蔽,0x3FFC_0000 - 0x3FFF_FFFF映射到DSP SRAM0 0x0728_0000 - 0x072B_FFFF
SRAM SPACE10x4000_0000 - 0x7FFF_FFFF1GB0x4000_0000 - 0x4003_FFFF映射到DSP SRAM1 0x072C_0000 - 0x072F_FFFF,其余区间无映射

设备树配置

reserved-memory {
    dsp0ddr_reserved: dsp0ddr@4a000000 {
        reg =<0x00x4a0000000x00x00a00000>;
        no-map;
};

    riscvsram0_reserved: riscvsram0@7280000{
        reg =<0x00x072800000x00x40000>;
        no-map;
};

    riscvsram1_reserved: riscvsram1@72c0000 {
        reg =<0x00x072c00000x00x40000>;
        no-map;
};

/*
    * The name should be "vdev%dbuffer".
    * Its size should be not less than
    *     RPMSG_BUF_SIZE * (num of buffers in a vring) * 2
    *   = 512 * (num of buffers in a vring) * 2
    */
    dsp_vdev0buffer: vdev0buffer@4ac00000 {
        compatible ="shared-dma-pool";
        reg =<0x00x4ac000000x00x40000>;
        no-map;
};

/*
    * The name should be "vdev%dvring%d".
    * The size of each should be not less than
    *     PAGE_ALIGN(vring_size(num, align))
    *   = PAGE_ALIGN(16 * num + 6 + 2 * num + (pads for align) + 6 + 8 * num)
    *
    * (Please refer to the vring layout in include/uapi/linux/virtio_ring.h)
    */
    dsp_vdev0vring0: vdev0vring0@4ac40000 {
        reg =<0x00x4ac400000x00x2000>;
        no-map;
};
    dsp_vdev0vring1: vdev0vring1@4ac42000 {
        reg =<0x00x4ac420000x00x2000>;
        no-map;
};

/*
     * The name should be "vdev%dbuffer".
     * Its size should be not less than
     *     RPMSG_BUF_SIZE * (num of buffers in a vring) * 2
     *   = 512 * (num of buffers in a vring) * 2
     */
    rv_vdev0buffer: vdev0buffer@4ae00000 {
        compatible ="shared-dma-pool";
        reg =<0x00x4ae000000x00x40000>;
        no-map;
};

/*
     * The name should be "vdev%dvring%d".
     * The size of each should be not less than
     *     PAGE_ALIGN(vring_size(num, align))
     *   = PAGE_ALIGN(16 * num + 6 + 2 * num + (pads for align) + 6 + 8 * num)
     *
     * (Please refer to the vring layout in include/uapi/linux/virtio_ring.h)
     */
    rv_vdev0vring0: vdev0vring0@4ae40000 {
        reg =<0x00x4ae400000x00x2000>;
        no-map;
};
    rv_vdev0vring1: vdev0vring1@4ae42000 {
        reg =<0x00x4ae420000x00x2000>;
        no-map;
};

/*
    * mcu ram addr
    */
    mcu0iram_reserved: mcu0iram@20000{
        reg =<0x00x200000x00x10000>;
        no-map;
};
    mcu0dram0_reserved: mcu0dram0@30000{
        reg =<0x00x300000x00x8000>;
        no-map;
};
    mcu0dram1_reserved: mcu0dram1@38000{
        reg =<0x00x380000x00x8000>;
        no-map;
};

    dsp0_rpbuf_reserved: dsp0_rpbuf@4ae44000 {
        compatible ="shared-dma-pool";
        no-map;
        reg =<0x00x4ae440000x00x8000>;
};

    dsp_share_space@4ab00000 {
        no-map;
        reg =<0x00x4ab000000x00x10000>;
};
};
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值