0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

MPSoC R5引导4个A53和两个R5的应用程序的例子

FPGA之家 来源:赛灵思中文社区论坛 作者:付汉杰 2022-10-20 11:20 次阅读
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

01 介绍

工程师反馈R5引导A53和R5的应用程序后,A53和R5的应用程序没有正确执行。因此做了一个MPSoC R5引导4个A53和两个R5的应用程序的例子。

02 FSBL

MPSoC的FSBL能引导多个CPU的应用程序。工程师可以不理解上述寄存器的细节。如果boot.bin里的某个parttiion是某一个CPU的可执行代码,FSBL中的函数XFsbl_Handoff( )会启动对应的CPU。如果是目标CPU是A53,会使用函数

XFsbl_UpdateResetVector()更新A53的服务地址。

03 应用程序例子

由于只是简单例子,所以所有CPU都使用同一个串口。为了防止所有CPU打印出来的信息,混杂在一起,所以在打印之后,增加了1秒钟延时。


打印中,增加了CPU的信息,用于区分不同CPU。

int main()
{
    init_platform();

sleep(1);

    for( int i=0; ; i++ )
    {
    xil_printf("No.%d Hello World from r5-aaa.

", i );
    sleep(1);
    }

    cleanup_platform();
    return 0;
}

04 内存分配

4个A53和两个R5的应用程序,都运行在DDR里。每个应用程序,必须使用不同的DDR空间。

CPU DDR起始地址 DDR大小

84fa0ae0-3c6f-11ed-9e49-dac502259ad0.png

请根据上表,更新lscript.ld中的MEMORY里的ddr字段。A53-0的lscript.ld中的MEMORY部分,设置如下:

MEMORY
{
   psu_ddr_0_MEM_0 : ORIGIN = 0x1000000, LENGTH = 0x1000000
}

R5-0的lscript.ld中的MEMORY部分,设置如下:

MEMORY
{
   psu_ocm_ram_0_MEM_0 : ORIGIN = 0xFFFC0000, LENGTH = 0x40000
   psu_r5_0_atcm_MEM_0 : ORIGIN = 0x0, LENGTH = 0x10000
   psu_r5_0_btcm_MEM_0 : ORIGIN = 0x20000, LENGTH = 0x10000
   psu_r5_ddr_0_MEM_0 : ORIGIN = 0x3000000, LENGTH = 0x1000000
   psu_r5_tcm_ram_0_MEM_0 : ORIGIN = 0x0, LENGTH = 0x40000
}

05 R5引导4个A53和两个R5的bif文件例子

SDK里,制作启动文件boot.bin时,需要正确设置每个ELF文件的目标CPU。SDK不能根据ELF文件,自动设置目标CPU。如果设置错误,可能引起错误,导致相关CPU的代码,不能正确执行。

//arch = zynqmp; split = false; format = BIN
the_ROM_image:
{
[fsbl_config]r5_single
[bootloader]C:prjzcu106v183zcu106_bsp_hw_hdf
5a_fsblDebugd_r5a_fsbl.elf
[destination_cpu = a53-0]C:prjzcu106v183zcu106_bsp_hw_hdfa53a_helloDebugd_a53a_hello.elf
[destination_cpu = a53-1]C:prjzcu106v183zcu106_bsp_hw_hdfa53b_helloDebugd_a53b_hello.elf
[destination_cpu = a53-2]C:prjzcu106v183zcu106_bsp_hw_hdfa53c_helloDebugd_a53c_hello.elf
[destination_cpu = a53-3]C:prjzcu106v183zcu106_bsp_hw_hdfa53d_helloDebugd_a53d_hello.elf
[destination_cpu = r5-0]C:prjzcu106v183zcu106_bsp_hw_hdf
5a_helloDebugd_r5a_hello.elf
[destination_cpu = r5-1]C:prjzcu106v183zcu106_bsp_hw_hdf
5b_helloDebugd_r5b_hello.elf
}

06 R5引导4个A53和两个R5的启动记录
Xilinx Zynq MP First Stage Boot Loader
Release 2018.3   Oct 12 2020  -  1708
Reset Mode      :       System Reset
Platform: Silicon (4.0), Cluster ID 0xC0000100
Running on R5-0 Processor, Device Name: XCZU7EV
Initializing TCM ECC
Address 0xFFFD95F0, Length FFE00020, ECC initialized
Address 0xFFFD95F0, Length FFE20000, ECC initialized
FMC VADJ Configuration Successful
Board Configuration successful
Processor Initialization Done
================= In Stage 2 ============
SD1 with level shifter Boot Mode
SD: rc= 0
File name is BOOT.BIN
Multiboot Reg : 0x0
Image Header Table Offset 0x8C0
*****Image Header Table Details********
Boot Gen Ver: 0x1020000
No of Partitions: 0x9
Partition Header Address: 0x440
Partition Present Device: 0x0
Initialization Success
======= In Stage 3, Partition No:1 =======
UnEncrypted data Length: 0x2812
Data word offset: 0x2812
Total Data word length: 0x2812
Destination Load Address: 0x1000000
Execution Address: 0x1000000
Data word offset: 0x5CF0
Partition Attributes: 0x116
Partition 1 Load Success
======= In Stage 3, Partition No:2 =======
UnEncrypted data Length: 0x2812
Data word offset: 0x2812
Total Data word length: 0x2812
Destination Load Address: 0x2000000
Execution Address: 0x2000000
Data word offset: 0x8510
Partition Attributes: 0x216
Partition 2 Load Success
======= In Stage 3, Partition No:3 =======
UnEncrypted data Length: 0x2812
Data word offset: 0x2812
Total Data word length: 0x2812
Destination Load Address: 0x5000000
Execution Address: 0x5000000
Data word offset: 0xAD30
Partition Attributes: 0x316
Partition 3 Load Success
======= In Stage 3, Partition No:4 =======
UnEncrypted data Length: 0x2812
Data word offset: 0x2812
Total Data word length: 0x2812
Destination Load Address: 0x6000000
Execution Address: 0x6000000
Data word offset: 0xD550
Partition Attributes: 0x416
Partition 4 Load Success
======= In Stage 3, Partition No:5 =======
UnEncrypted data Length: 0x148
Data word offset: 0x148
Total Data word length: 0x148
Destination Load Address: 0x0
Execution Address: 0x3C
Data word offset: 0xFD70
Partition Attributes: 0x51E
XFsbl_PartitionCopy:Going for LOVEC HIGHVEC Mechanism for R5.
XFsbl_PartitionLoad:After Partition Validation
Going for LOVEC HIGHVEC Mechanism for R5.
Partition 5 Load Success
======= In Stage 3, Partition No:6 =======
UnEncrypted data Length: 0x9B1
Data word offset: 0x9B1
Total Data word length: 0x9B1
Destination Load Address: 0x3000000
Execution Address: 0x0
Data word offset: 0xFEC0
Partition Attributes: 0x51E
Partition 6 Load Success
======= In Stage 3, Partition No:7 =======
UnEncrypted data Length: 0x148
Data word offset: 0x148
Total Data word length: 0x148
Destination Load Address: 0x0
Execution Address: 0x3C
Data word offset: 0x10880
Partition Attributes: 0x61E
Initializing TCM ECC
Address 0xFFFD95F0, Length FFE90000, ECC initialized
Address 0xFFFD95F0, Length FFEB0000, ECC initialized
Partition 7 Load Success
======= In Stage 3, Partition No:8 =======
UnEncrypted data Length: 0x9B1
Data word offset: 0x9B1
Total Data word length: 0x9B1
Destination Load Address: 0x4000000
Execution Address: 0x0
Data word offset: 0x109D0
Partition Attributes: 0x61E
Partition 8 Load Success
All Partitions Loaded
================= In Stage 4 ============
PMU-FW is not running, certain applications may not be supported.
Protection configuration applied
CPU 0x100 reset release, Exec State 0x0, HandoffAddress: 1000000
CPU 0x200 reset release, Exec State 0x0, HandoffAddress: 2000000
CPU 0x300 reset release, Exec State 0x0, HandoffAddress: 5000000
CPU 0x400 reset release, Exec State 0x0, HandoffAddress: 6000000
CPU 0x600 reset release, Exec State 0x8, HandoffAddress: 3C
XFsbl_Handoff:Restored R5LovecBuffer to LOVEC for R5.
Running Cpu Handoff address: 0x3C, Exec State: 8
Exit from FSBL
No.0 Hello World from a53-aaa.
No.0 Hello World from a53-bbb.
No.0 Hello World from a53-ccc.
No.0 Hello World from a53-ddd.
No.0 Hello World from r5-bbb.
No.0 Hello World from r5-aaa.
No.1 Hello World from a53-aaa.
No.1 Hello World from a53-bbb.
No.1 Hello World from a53-ccc.
No.1 Hello World from a53-ddd.
No.1 Hello World from r5-bbb.
No.1 Hello World from r5-aaa.
No.2 Hello World from a53-aaa.
No.2 Hello World from a53-bbb.
No.2 Hello World from a53-ccc.
No.2 Hello World from a53-ddd.
No.2 Hello World from r5-bbb.

07 APU Module

由于MPSoC的FSBL能引导多个CPU的应用程序,工程师可以不理解下述寄存器的细节。


APU Module的基地址是0xFD5C0000,下列寄存器用于设置APU的复位地址。

RVBARADDR0L0x00000040Reset Vector Base Address
RVBARADDR0H0x00000044Reset Vector Base Address
RVBARADDR1L0x00000048Reset Vector Base Address
RVBARADDR1H0x0000004CReset Vector Base Address
RVBARADDR2L0x00000050Reset Vector Base Address
RVBARADDR2H0x00000054Reset Vector Base Address
RVBARADDR3L0x00000058Reset Vector Base Address
RVBARADDR3H0x0000005CReset Vector Base Address

08 RPU Module

RPU Module的基地址是0xFF9A0000,下列寄存器用于设置RPU的复位地址。

RPU0_CFG    0x00000100Configuration Parameters specific to RPU0
RPU1_CFG0x00000200Configuration Parameters specific to RPU1

审核编辑 :李倩


声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • 寄存器
    +关注

    关注

    31

    文章

    5619

    浏览量

    130410
  • cpu
    cpu
    +关注

    关注

    68

    文章

    11327

    浏览量

    225880
  • 应用程序
    +关注

    关注

    38

    文章

    3346

    浏览量

    60419

原文标题:【工程师分享】MPSoC R5引导4个A53和两个R5的应用程序的例子

文章出处:【微信号:zhuyandz,微信公众号:FPGA之家】欢迎添加关注!文章转载请注明出处。

收藏 人收藏
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

    评论

    相关推荐
    热点推荐

    S32K系列引导加载程序应用程序跨不同定制电路板设计的跳转问题求解

    我在两个自定义S32K358板上实现引导加载程序时遇到了问题,将不胜感激您的见解。 **设置:** - 块板使用相同的S32K358微控制器 - 板 1:
    发表于 04-22 07:02

    S32K3跳转到应用程序后,PTD5上没有活动,为什么?

    我正在编写一在微S32K324上加载的引导加载程序。 为了解决这个问题,我编写了一非常简单的引导加载
    发表于 04-16 08:59

    关于S32G3引导加载程序构建问题求解

    我目前正在使用 S32G3 SoC,并按照 AN13750 中概述的指南探索 A53 和 M7 内核的并行启动。在执行引导加载程序构建的最后阶段(第 5.3 节)时,我在执行launch.bat
    发表于 04-07 08:24

    如何在 i.MX RT1050 上实现两个镜像(引导加载程序应用程序)的双 HAB 身份验证?

    ,请验证应用映像的真实性。 但是,我想知道: 可以使用吗恩智浦生成的证书(来自安全配置工具)或HAB 机制本身对引导加载程序应用程序映像进行身份验证? 如果是这样,推荐的方法是什么安全地为
    发表于 04-07 06:14

    如何在 S32G3 上的 M7 和 A53 内核之间建立 IPCF 通信?

    我能够成功并行启动 S32G3 的 M7 和 A53 内核。对于 M7 内核,我在 U-Boot 时停止,将固件加载到 SRAM 中,然后手动执行它。我的目标是在两个内核之间建立 IPCF 通信
    发表于 03-05 07:28

    AD817配合ADG1211设计一电流源

    摆率不会导致其失真,可能是什么原因导致的呢? 而且也并不是严格意义上的恒流源,是因为ADG1211的通电阻120欧姆,影响了我的恒流情况吗 这是我的原理图 后面我又将R4R5进行改变,改为1k
    发表于 01-24 01:15

    CS5N90A4R数据手册

    详细描述了CS5N90A4R的通用描述、特性、应用、绝对最大额定值、电气特性、封装信息等。
    发表于 12-27 13:44 0次下载

    圣邦微电子SGM51613R4A/SGM51613R8A:高性能16位ADC的深度剖析

    : SGM51613R4A_SGM51613R8A.PDF 一、器件概述 SGM51613R4A和SGM51613R8A款功能强大的ADC,它们采用单电源VDD供电,一般为
    的头像 发表于 11-27 16:20 2329次阅读
    圣邦微电子SGM51613<b class='flag-5'>R4A</b>/SGM51613<b class='flag-5'>R8A</b>:高性能16位ADC的深度剖析

    DK5V60R10VT1东科高性能同步整流芯片

    DK5V60R10VT1是一款简单高效率的同步整流芯片,只有A,K两个功能引脚,分别对应肖特基二极管的PN管脚。芯片内部集成了60V功率NMOS管,可以大幅降低二极管通损耗,提高整机
    发表于 09-25 09:17 0次下载

    V5.2.1 A53 SMP启动卡死的原因?怎么解决?

    问题现象 使用标准版,A53双核,调试SMP。 SMP第二核启动后, 1,检查Core0和Core1的VBAR_EL1是相同的0x22C000; 2,检查Core0的SP_EL1
    发表于 09-12 07:32

    基于AM64x Sitara™处理器的工业应用解决方案

    理进行独特组合。AM64x将基于Arm的器件的两个示例与支持千兆位TSN的PRU-ICSSG与多达两个Arm Cortex-A53内核、多达四Cortex-
    的头像 发表于 09-03 11:53 1009次阅读
    基于AM64x Sitara™处理器的工业应用解决方案

    如何用Arduino Nano/UNO R3开发板给另一Arduino IDE不能下载的Arduino Nano/UNO R3开发板重新烧录引导程序bootlaoder

    本文介绍了如何用能够Arduino IDE下载的Arduino Nano/UNO R3开发板给另一Arduino IDE不能下载的Arduino Nano/UNO R3开发板重新烧录引导
    的头像 发表于 08-08 20:16 3959次阅读
    如何用Arduino Nano/UNO <b class='flag-5'>R</b>3开发板给另一<b class='flag-5'>个</b>Arduino IDE不能下载的Arduino Nano/UNO <b class='flag-5'>R</b>3开发板重新烧录<b class='flag-5'>引导</b><b class='flag-5'>程序</b>bootlaoder

    一般晶体管光耦的开关特性

    要求,此处输出通Vce约为0.2V,(Vol<10%Vcc),为方便观察高电平交叉点,采用同相输出接法。需要说明的是,本篇我们只考虑固定的R5R6值,也就是确
    的头像 发表于 06-26 09:59 765次阅读
    一般晶体管光耦的开关特性

    Banana Pi BPI-R4 Pro Wifi7 路由器开发板采用联发科MT7988A芯片设计,支持42.5G网口,支持210G光电口,支持4G/5G扩展

    、128MB SPI-NAND 闪存。支持42.G网口,支持210G光电口,支持4G/5G扩展。它是 BPI-
    的头像 发表于 05-28 16:33 2543次阅读
    Banana Pi BPI-<b class='flag-5'>R4</b> Pro Wifi7 路由器开发板采用联发科MT7988<b class='flag-5'>A</b>芯片设计,支持<b class='flag-5'>4</b><b class='flag-5'>个</b>2.5G网口,支持2<b class='flag-5'>个</b>10G光电口,支持<b class='flag-5'>4</b>G/<b class='flag-5'>5</b>G扩展

    基于RFSOC的8路5G ADC和8路9G的DAC PCIe卡

    板卡使用Xilinx最新的第三代RFSOC系列,单颗芯片包含8路ADC和DAC,64-bit Cortex A53系列4核CPU,Cortex-R5F实时处理核,以及大容量FPGA。
    的头像 发表于 05-10 11:54 1202次阅读
    基于RFSOC的8路<b class='flag-5'>5</b>G ADC和8路9G的DAC PCIe卡