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-AM62A-LP:##39;cryptodev##39;:无法分配存储器

Guru**** 2560390 points
Other Parts Discussed in Thread: SK-AM62

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1358135/sk-am62a-lp-cryptodev-cannot-allocate-memory

器件型号:SK-AM62A-LP
主题中讨论的其他器件:SK-AM62AM62A7

你好

我们目前正在使用 SDK 9.01并应用 Falcon 模式。

要从 eMMC 引导、我将引导参数设置为如下所示。


bootargs = "console=ttyS2,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4";

但是、引导后、内核模块加载失败。


日志如下所示。 是否有解决方案?


root@am62axx-evm:/opt/edgeai-gst-apps# systemctl status systemd-modules-load.service
x systemd-modules-load.service - Load Kernel Modules
     Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static)
     Active: failed (Result: exit-code) since Thu 2022-04-28 18:20:43 UTC; 29s ago
       Docs: man:systemd-modules-load.service(8)
             man:modules-load.d(5)
    Process: 171 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
   Main PID: 171 (code=exited, status=1/FAILURE)

Apr 28 18:20:43 am62axx-evm systemd-modules-load[171]: Failed to insert module 'cryptodev': Cannot allocate memory
Apr 28 18:20:43 am62axx-evm systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Apr 28 18:20:43 am62axx-evm systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Apr 28 18:20:43 am62axx-evm systemd[1]: Failed to start Load Kernel Modules.
Notice: journal has been rotated since unit was started, output may be incomplete.
  

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

    我选中了 AM62A SDK 9.1、则 cryptodev 内核模块的安装工作原理如下所示

    root@am62axx-evm:/opt/edgeai-gst-apps# uname -a
    Linux am62axx-evm 6.1.46-g247b2535b2 #1 SMP PREEMPT Wed Dec  6 17:54:04 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
    root@am62axx-evm:/opt/edgeai-gst-apps# lsmod | grep cryptodev
    cryptodev              53248  0
    root@am62axx-evm:/opt/edgeai-gst-apps# dmesg | grep cryptodev
    [    4.681272] cryptodev: loading out-of-tree module taints kernel.
    [    4.695780] cryptodev: driver 1.12 loaded.
    root@am62axx-evm:/opt/edgeai-gst-apps#

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/09_01_00/exports/docs/linux/Foundational_Components /内核/ Kernel_Drivers / Crypto.html

    "SDK 附带的文件系统随 CryptoDEV 内核模块构建而成、直接访问硬件加速器的 TI 驱动程序内核中内置了。"
    此致!
    -hong

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

    您是否在 eMMC 上做到过这一点?

    此致、

    Kim

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

    我将附加我之前通过在 SK-AM62上进行 eMMC 引导捕获的日志。

    [5.379549] cryptodev: driver 1.10 loaded.

    我使用了 tisdk-base-image-am62xx-evm.tar.xz"并将其刷写到 eMMC UDA。
    此致!
    -hong

    e2e.ti.com/.../am62_5F00_8.3_5F00_emmc_5F00_boot_5F00_linux_5F00_full.log

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

    我正在使用 edgeai 映像、当未应用 falcon 模式时、它正常工作。

    我的 falcon bin 文件

    e2e.ti.com/.../atf_2D00_tee_2D00_dm_2D00_kernel_2D00_fdt.zip

    然后设置0x400 ATF-TEE-dm-kernel

    setenv dfu_alt_info_emmc "'"rawemmc raw 0 0x800000 mmcpart 1";" rootfs part 0 1";" tiboot3.bin.raw raw 0x0 0x400 mmcpart 1";" atf-tee-dm-kernel-fdt.bin.raw raw 0x400 0x10000 mmcpart 1"'"

    作为测试的结果、上述错误大约发生了10次中的6次。

    您能找出问题是什么吗?

    此致

    Kim

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我正在使用 edgeai 映像、并且在未应用 falcon 模式时运行时没有错误。

    1/. 如果未应用 falcon 模式、您是否会将日志作为附件上传?
    2/. 测试是在 TI 参考板还是在客户板上完成?
    此致!
    -hong

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

    从 Falcon 引导模式的日志中、有几个"VMAP 分配大小 xxxxx 失败..."。
    [4.141588]大小479232的 VMAP 分配失败:使用 vmalloc= 以增加尺寸

    Falcon 引导模式下内核 VMAP/vmalloc 问题的一个假设可能是由于 DDR 中的内核映像重定位、或者组合 kernel/rootfs 的构建方式。 我的理解是、常见问题解答基于 SDK 8.6。
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1205638/faq-am625-how-to-boot-from-r5-u-boot-spl-directly-into-the-linux-kernel-skipping-a53-spl-and-a53-u-boot-falcon-mode
    让我在我的同事中讲述他对 SDK 9.x 上 Falcon 引导模式集成的输入。

    此致!
    -hong

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

    我们以从 eMMC 到 edgeai 启动的10秒为目标。
    通过当前的引导时间优化文档、已确认引导需要长达13秒的时间。
    我认为猎鹰模式是绝对必要的目标10秒。
    如果还有其他方法、请告诉我

    此致、

    Kim

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

    您好、Kim、

    在 falcon 引导模式下、

    您能否提供命令"lsmod"的输出?

    如果使用命令"modprobe cryptodev"手动加载 cryptodev 驱动程序、控制台日志是什么?

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

    您好、Bin Liu

    烟雾:

    root@am62axx-evm:/opt/edgeai-gst-apps# lsmod
    Module                  Size  Used by
    root@am62axx-evm:/opt/edgeai-gst-apps# 

    modprobe:  

    root@am62axx-evm:/opt/edgeai-gst-apps# modprobe cryptodev
    [   99.945649] alloc_vmap_area: 6 callbacks suppressed
    [   99.945668] vmap allocation for size 57344 failed: use vmalloc=<size> to increase size
    [   99.958650] warn_alloc: 72 callbacks suppressed
    [   99.958661] modprobe: vmalloc error: size 53248, vm_struct allocation failed, mode:0xcc0(GFP_KERNEL), nodemask=(null),cpuset=/,mems_allowed=0
    [   99.975920] CPU: 1 PID: 1402 Comm: modprobe Tainted: G           O       6.1.46-g247b2535b2 #1
    [   99.984520] Hardware name: Texas Instruments AM62A7 SK (DT)
    [   99.990078] Call trace:
    [   99.992514]  dump_backtrace.part.0+0xdc/0xf0
    [   99.996786]  show_stack+0x18/0x30
    [  100.000093]  dump_stack_lvl+0x68/0x84
    [  100.003752]  dump_stack+0x18/0x34
    [  100.007059]  warn_alloc+0x114/0x1b0
    [  100.010541]  __vmalloc_node_range+0x590/0x6e0
    [  100.014886]  module_alloc+0xec/0x100
    [  100.018454]  load_module+0xa1c/0x1c80
    [  100.022109]  __do_sys_finit_module+0xac/0x104
    [  100.026458]  __arm64_sys_finit_module+0x20/0x30
    [  100.030980]  invoke_syscall+0x48/0x114
    [  100.034719]  el0_svc_common.constprop.0+0xd4/0xfc
    [  100.039414]  do_el0_svc+0x20/0x30
    [  100.042720]  el0_svc+0x28/0xa0
    [  100.045767]  el0t_64_sync_handler+0xbc/0x140
    [  100.050027]  el0t_64_sync+0x18c/0x190
    [  100.053707] Mem-Info:
    [  100.055987] active_anon:136 inactive_anon:14206 isolated_anon:0
    [  100.055987]  active_file:10564 inactive_file:47455 isolated_file:0
    [  100.055987]  unevictable:0 dirty:8 writeback:0
    [  100.055987]  slab_reclaimable:4873 slab_unreclaimable:6289
    [  100.055987]  mapped:14661 shmem:2264 pagetables:452
    [  100.055987]  sec_pagetables:0 bounce:0
    [  100.055987]  kernel_misc_reclaimable:0
    [  100.055987]  free:753778 free_pcp:7069 free_cma:146897
    [  100.095385] Node 0 active_anon:544kB inactive_anon:56824kB active_file:42256kB inactive_file:189820kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:58644kB dirty:32kB writeback:0kB shmem:9056kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 10240kB writeback_tmp:0kB kernel_stack:2848kB pagetables:1808kB sec_pagetables:0kB all_unreclaimable? no
    [  100.126976] DMA free:1378840kB boost:0kB min:18312kB low:22888kB high:27464kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:2097148kB managed:1383188kB mlocked:0kB bounce:0kB free_pcp:2112kB local_pcp:0kB free_cma:587588kB
    [  100.154225] lowmem_reserve[]: 0 0 1969 1969
    [  100.158421] Normal free:1636272kB boost:0kB min:26740kB low:33424kB high:40108kB reserved_highatomic:0KB active_anon:544kB inactive_anon:56824kB active_file:42256kB inactive_file:189820kB unevictable:0kB writepending:32kB present:2097152kB managed:2016708kB mlocked:0kB bounce:0kB free_pcp:26164kB local_pcp:6360kB free_cma:0kB
    [  100.187234] lowmem_reserve[]: 0 0 0 0
    [  100.190906] DMA: 6*4kB (MC) 4*8kB (MC) 6*16kB (MC) 4*32kB (MC) 6*64kB (MC) 5*128kB (MC) 3*256kB (M) 7*512kB (MC) 5*1024kB (MC) 4*2048kB (M) 332*4096kB (MC) = 1378840kB
    [  100.205897] Normal: 418*4kB (UM) 219*8kB (UME) 199*16kB (UM) 91*32kB (UME) 48*64kB (UM) 19*128kB (UM) 17*256kB (UM) 8*512kB (UME) 5*1024kB (ME) 1*2048kB (E) 392*4096kB (M) = 1636272kB
    [  100.222282] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
    [  100.230972] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=32768kB
    [  100.239489] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
    [  100.247918] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB
    [  100.256173] 60285 total pagecache pages
    [  100.260006] 0 pages in swap cache
    [  100.263318] Free swap  = 0kB
    [  100.266197] Total swap = 0kB
    [  100.269066] 1048575 pages RAM
    [  100.272031] 0 pages HighMem/MovableOnly
    [  100.275863] 198601 pages reserved
    [  100.279175] 147456 pages cma reserved
    [  100.282833] 0 pages hwpoisoned
    modprobe: ERROR: could not insert 'cryptodev': Cannot allocate memory

    此致、

    Kim

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

    您好、Kim、

    有趣的是 lsmod 命令不会显示在 falcon 模式下加载了任何模块。 在非 falcon 模式下是否相同? 但我不确定这是否相关。

    您是否在测试中重建了内核(及其模块)? 或者您刚刚使用了 SDK 重建的内核二进制文件?

    请在 falcon 和 non-falcon 模式下共享命令"cat /proc/meminfo "的输出。

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

    您好、Liu

    没有 rebuid、只是我通过将它创建为 rootfs.ext4来使用 tisdk-edgeai-image-am62axx-evm.tar.xz。

    无鹰:

    root@am62axx-evm:/opt/edgeai-gst-apps# cat /proc/meminfo   
    MemTotal:        3399896 kB
    MemFree:         2977156 kB
    MemAvailable:    3112212 kB
    Buffers:           11136 kB
    Cached:           254164 kB
    SwapCached:            0 kB
    Active:            44044 kB
    Inactive:         270996 kB
    Active(anon):        640 kB
    Inactive(anon):    58268 kB
    Active(file):      43404 kB
    Inactive(file):   212728 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:              2920 kB
    Writeback:             0 kB
    AnonPages:         49360 kB
    Mapped:            58184 kB
    Shmem:              9168 kB
    KReclaimable:      21368 kB
    Slab:              49088 kB
    SReclaimable:      21368 kB
    SUnreclaim:        27720 kB
    KernelStack:        3200 kB
    PageTables:         1776 kB
    SecPageTables:         0 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:     1699948 kB
    Committed_AS:     380328 kB
    VmallocTotal:   133143592960 kB
    VmallocUsed:       11120 kB
    VmallocChunk:          0 kB
    Percpu:             1264 kB
    HardwareCorrupted:     0 kB
    AnonHugePages:     12288 kB
    ShmemHugePages:        0 kB
    ShmemPmdMapped:        0 kB
    FileHugePages:         0 kB
    FilePmdMapped:         0 kB
    CmaTotal:         589824 kB
    CmaFree:          583460 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    Hugetlb:               0 kB

    Falcon:  

    root@am62axx-evm:/opt/edgeai-gst-apps# cat /proc/meminfo 
    MemTotal:        3399892 kB
    MemFree:         3018172 kB
    MemAvailable:    3129596 kB
    Buffers:           11244 kB
    Cached:           231256 kB
    SwapCached:            0 kB
    Active:            43268 kB
    Inactive:         246156 kB
    Active(anon):        548 kB
    Inactive(anon):    55440 kB
    Active(file):      42720 kB
    Inactive(file):   190716 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:              2828 kB
    Writeback:             0 kB
    AnonPages:         46476 kB
    Mapped:            58288 kB
    Shmem:              9064 kB
    KReclaimable:      19496 kB
    Slab:              44952 kB
    SReclaimable:      19496 kB
    SUnreclaim:        25456 kB
    KernelStack:        3040 kB
    PageTables:         1936 kB
    SecPageTables:         0 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:     1699944 kB
    Committed_AS:     377232 kB
    VmallocTotal:   133143592960 kB
    VmallocUsed:        6860 kB
    VmallocChunk:          0 kB
    Percpu:             1264 kB
    HardwareCorrupted:     0 kB
    AnonHugePages:      8192 kB
    ShmemHugePages:        0 kB
    ShmemPmdMapped:        0 kB
    FileHugePages:         0 kB
    FilePmdMapped:         0 kB
    CmaTotal:         589824 kB
    CmaFree:          587588 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    Hugetlb:               0 kB
    

    此致、

    Kim

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

    您好、Kim、

    我已在从 SD 卡引导的 SK-AM62A 上尝试了 SDK9.1 falcon 引导、但我无法重现问题、tiboot3.bin 直接引导内核(在 tispl.bin 中)并加载了 cryptodev 模块而未出现任何问题、内核中也没有 vmalloc 错误。

    下面是 falcon 引导的 u-boot 修补程序:

    diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
    index c4c5c3711009..14e1afb2fa26 100644
    --- a/arch/arm/mach-k3/sysfw-loader.c
    +++ b/arch/arm/mach-k3/sysfw-loader.c
    @@ -91,7 +91,7 @@ static void *sysfw_load_address;
     struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size)
     {
            if (sysfw_loaded)
    -               return (struct legacy_img_hdr *)(CONFIG_TEXT_BASE + offset);
    +               return (struct legacy_img_hdr *)(CONFIG_SPL_LOAD_FIT_ADDRESS + offset);
            else if (sysfw_load_address)
                    return sysfw_load_address;
            else
    diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig
    index b92fea415a39..c804e91c377e 100644
    --- a/configs/am62ax_evm_r5_defconfig
    +++ b/configs/am62ax_evm_r5_defconfig
    @@ -25,7 +25,7 @@ CONFIG_SPL_FS_FAT=y
     CONFIG_SPL_LIBDISK_SUPPORT=y
     CONFIG_SPL_SPI=y
     CONFIG_SPL_LOAD_FIT=y
    -CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000
    +CONFIG_SPL_LOAD_FIT_ADDRESS=0x82200000
     CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
     # CONFIG_DISPLAY_CPUINFO is not set
     CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD=y

    下面是用于在 SD 卡上为 rootfs 添加引导参数的内核补丁:

    diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
    index 0b101d9899e0..a71f32b0326b 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
    +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
    @@ -28,6 +28,7 @@ aliases {
     
            chosen {
                    stdout-path = "serial2:115200n8";
    +               bootargs = "console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait";
            };
     
            memory@80000000 {

    将编译的 K3-am62a7-sk.dtb 复制到 SDK 预编译目录、覆盖预编译的目录。

    这是我的 tispl.it文件、放在 SDK 预编译目录中:

    e2e.ti.com/.../3480.tispl.its

    在 SDK 预编译目录中运行以下命令以生成内核 ftimage tispl.bin:

    $ mkimage -E -f tispl.its tispl.bin

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

    您好、Liu

    感谢测试

    在 SD 卡上进行测试时也没有出现问题。

    抱歉、您也能在 eMMC 上测试吗?

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

    您好、Kim、

    我从未尝试将整个 SDK 默认 rootfs 刷写到 eMMC。 您能否分享用于创建 ext4映像文件并刷写到 eMMC 的步骤?

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

    您好、Liu

    make rootfs.ext4 (edgeai)

    $ cd <path-ti-psdk>/filesystem
    $ dd if=/dev/null of=rootfs.ext4 bs=1M seek=6000
    $ mkfs.ext4 -F rootfs.ext4
    $ mkdir mnt_fs
    $ sudo mount -t ext4 rootfs.ext4 mnt_fs
    $ cd mnt_fs
    $ sudo tar xvf ../tisdk-edgeai-image-am62axx-evm.tar.xz
    $ cd ..
    $ sudo umount mnt_fs

    DFU:

    setenv dfu_alt_info_emmc 'rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 1; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x11000 mmcpart 1'
    
    setenv dfu_alt_info ${dfu_alt_info_emmc}
    
    gpt write mmc 0 "$""{"partitions"}"
    
    dfu 0 mmc 0
    

    eMMC tiboot3.bin.RAW 和 falcon.RAW 和 rootfs 写入

    以及为 eMMC 引导设置 MMC

    mmc bootbus 0 2 0 0
    
    mmc rst-function 0 1
    
    mmc partconf 0 1 1 1
    
    setenv mmcdev 0
    
    setenv bootpart 0
    

    这是我第一次这样做、所以我不知道上述内容是否正确。

    此致、

    Kim

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

    您好、Kim、

    从 SD 卡多次启动后、我能够看到问题。

    我将对其进行介绍。

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

    您好、Liu、

    问题是否解决了?

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

    您好、Kim、

    我认为找出问题可能需要更长时间、因此我在这里采取不同的方法-我想我们可以到达10秒的启动目标、而不是使用 falcon 模式、从 eMMC 正常启动模式并进行一些优化。

    以下日志显示、从 SD 卡引导 SK-AM62x 大约需要13.3秒、并进行以下优化:

    -在引导参数中添加了"quiet ",以抑制大多数内核引导日志;

    -删除/etc/systemd/system/multi-user.target.wants/gplv3-notice.service

    [2024-05-16 14:07:13.191] U-Boot SPL 2023.04-00003-g3fe6aef56587 (May 14 2024 - 14:08:28 -0500)
    [2024-05-16 14:07:13.207] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    [2024-05-16 14:07:13.255] am62a_init: board_init_f done                         
    [2024-05-16 14:07:13.255] SPL initial stack usage: 17040 bytes                  
    [2024-05-16 14:07:13.255] am62a_init: spl_boot_device: devstat = 0x243 bootmedia = 0x8 bootindex = 0 
    [2024-05-16 14:07:13.271] Trying to boot from MMC2                              
    [2024-05-16 14:07:13.367] Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    [2024-05-16 14:07:13.383] Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    [2024-05-16 14:07:13.399] Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    [2024-05-16 14:07:13.415] Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    [2024-05-16 14:07:13.431] Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    [2024-05-16 14:07:13.511] Starting ATF on ARM64 core...                         
    [2024-05-16 14:07:13.511]                                                       
    [2024-05-16 14:07:13.511] NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    [2024-05-16 14:07:13.511] NOTICE:  BL31: Built : 09:34:15, Aug 24 2023          
    [2024-05-16 14:07:13.671]                                                       
    [2024-05-16 14:07:13.671] U-Boot SPL 2023.04-00003-g3fe6aef56587 (May 14 2024 - 14:08:36 -0500)
    [2024-05-16 14:07:13.671] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    [2024-05-16 14:07:13.687] am62a_init: board_init_f done                         
    [2024-05-16 14:07:13.687] am62a_init: spl_boot_device: devstat = 0x243 bootmedia = 0x8 bootindex = 0 
    [2024-05-16 14:07:13.687] Trying to boot from MMC2                              
    [2024-05-16 14:07:13.831] Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    [2024-05-16 14:07:13.879] Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    [2024-05-16 14:07:14.599]                                                       
    [2024-05-16 14:07:14.599]                                                       
    [2024-05-16 14:07:14.599] U-Boot 2023.04-00003-g3fe6aef56587 (May 14 2024 - 14:08:36 -0500)
    [2024-05-16 14:07:14.615]                                                       
    [2024-05-16 14:07:14.615] SoC:   AM62AX SR1.0 GP                                
    [2024-05-16 14:07:14.615] Model: Texas Instruments AM62A7 SK                    
    [2024-05-16 14:07:14.615] DRAM:  2 GiB (effective 4 GiB)                        
    [2024-05-16 14:07:14.903] Core:  58 devices, 28 uclasses, devicetree: separate  
    [2024-05-16 14:07:14.903] MMC:   mmc@fa10000: 0, mmc@fa00000: 1                 
    [2024-05-16 14:07:14.919] Loading Environment from nowhere... OK                
    [2024-05-16 14:07:14.919] In:    serial@2800000                                 
    [2024-05-16 14:07:14.919] Out:   serial@2800000                                 
    [2024-05-16 14:07:14.935] Err:   serial@2800000                                 
    [2024-05-16 14:07:14.935] Net:   eth0: ethernet@8000000port@1                   
    [2024-05-16 14:07:14.951] Hit any key to stop autoboot:  2 ^H^H^H 1 ^H^H^H 0       
    [2024-05-16 14:07:16.966] switch to partitions #0, OK                           
    [2024-05-16 14:07:16.966] mmc1 is current device                                
    [2024-05-16 14:07:16.998] SD/MMC found on device 1                              
    [2024-05-16 14:07:16.998] Failed to load 'boot.scr'                             
    [2024-05-16 14:07:17.014] 652 bytes read in 22 ms (28.3 KiB/s)                  
    [2024-05-16 14:07:17.030] Loaded env from uEnv.txt                              
    [2024-05-16 14:07:17.031] Importing environment from mmc1 ...                   
    [2024-05-16 14:07:17.031] ## Error: "main_cpsw0_qsgmii_phyinit" not defined        
    [2024-05-16 14:07:17.862] 20302336 bytes read in 828 ms (23.4 MiB/s)            
    [2024-05-16 14:07:17.894] 57364 bytes read in 26 ms (2.1 MiB/s)                 
    [2024-05-16 14:07:17.894] Working FDT set to 88000000                           
    [2024-05-16 14:07:17.895] ## Flattened Device Tree blob at 88000000             
    [2024-05-16 14:07:17.910]    Booting using the fdt blob at 0x88000000           
    [2024-05-16 14:07:17.911] Working FDT set to 88000000                           
    [2024-05-16 14:07:17.942]    Loading Device Tree to 000000008feee000, end 000000008fffffff ... OK
    [2024-05-16 14:07:17.943] Working FDT set to 8feee000                           
    [2024-05-16 14:07:17.958]                                                       
    [2024-05-16 14:07:17.958] Starting kernel ...                                   
    [2024-05-16 14:07:17.958]                                                       
    [2024-05-16 14:07:18.182] [    0.056433] omap-mailbox 29030000.mailbox: no available mbox devices found
    [2024-05-16 14:07:18.758] [    0.635656] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [2024-05-16 14:07:18.774] [    0.644092] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [2024-05-16 14:07:18.775] [    0.651514] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [2024-05-16 14:07:20.006] [    1.871278] systemd[1]: Failed to start Start psplash boot splash screen.
    [2024-05-16 14:07:20.007] [FAILED] Failed to start Start psplash boot splash screen.
    [2024-05-16 14:07:20.022] [DEPEND] Dependency failed for Star…progress communication helper.
    [2024-05-16 14:07:21.094] [    2.961639] vdec 30210000.video-codec: error -ENXIO: IRQ index 0 not found
    [2024-05-16 14:07:21.094] [    2.968646] vdec 30210000.video-codec: failed to get irq resource, falling back to polling
    [2024-05-16 14:07:21.190] [    3.059374] k3-dsp-rproc 7e000000.dsp: booting DSP core using boot addr = 0x99a00000
    [2024-05-16 14:07:26.438]                                                       
    [2024-05-16 14:07:26.438]  _____                    _____           _         _ 
    [2024-05-16 14:07:26.454] |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_  
    [2024-05-16 14:07:26.454] |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _| 
    [2024-05-16 14:07:26.454] |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
    [2024-05-16 14:07:26.470]               |___|                    |___|          
    [2024-05-16 14:07:26.470]                                                       
    [2024-05-16 14:07:26.470] Arago Project am62axx-evm -                           
    [2024-05-16 14:07:26.470]                                                       
    [2024-05-16 14:07:26.470] Arago 2023.10 am62axx-evm -                           
    [2024-05-16 14:07:26.470]                                                       
    [2024-05-16 14:07:26.470] am62axx-evm login:

    通过进一步的优化、您应该能够在10秒内从 eMMC 引导;

    -从 eMMC 启动比从 SD 卡启动要快;

    -删除3秒 u-boot 启动延迟;

    -在 uboot SPL 中启用 MMC ADMA 支持;

    -进一步从/etc/systemd/system/multi-user.target.wants 目录中删除未使用的服务;

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

    您好、Liu

    感谢您的帮助、我将尝试

    在哪里可以删除 u-boot 延迟?

    此致、

    Kim

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

    您好、Kim、

    我没有对此进行测试、但请尝试 uboot 补丁:

    diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
    index 9774efed7385..a6d0ef75be4a 100644
    --- a/configs/am62x_evm_a53_defconfig
    +++ b/configs/am62x_evm_a53_defconfig
    @@ -203,3 +203,4 @@ CONFIG_SPL_HIDE_LOGO_VERSION=y
     CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
     CONFIG_SPL_GZIP=y
     CONFIG_OF_LIBFDT_OVERLAY=y
    +CONFIG_BOOTDELAY=0

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

    您好、Liu

    我应用了以下两项、但启动时间仅为16秒。

    -在引导参数中添加了"quiet ",以抑制大多数内核引导日志;

    -删除/etc/systemd/system/multi-user.target.wants/gplv3-notice.service

    [0.000126 0.000125] U-Boot SPL 2023.04-dirty (May 17 2024 - 11:04:52 +0900)
    [0.002418 0.002292] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    [0.047812 0.045394] am62a_init: board_init_f done
    [0.048132 0.000320] SPL initial stack usage: 17040 bytes
    [0.064178 0.016046] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [0.064902 0.000723] Trying to boot from MMC1
    [0.575742 0.510840] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [0.578720 0.002978] Authentication passed
    [0.591610 0.012890] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [0.592285 0.000675] Authentication passed
    [0.607588 0.015303] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [0.608521 0.000933] Authentication passed
    [0.655926 0.047405] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [0.658616 0.002689] Authentication passed
    [0.671687 0.013071] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [0.674324 0.002637] Authentication passed
    [0.687755 0.013431] Starting ATF on ARM64 core...
    [0.688901 0.001147] 
    [0.688948 0.000046] NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    [0.704163 0.015215] NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    [0.847659 0.143497] 
    [0.847708 0.000049] U-Boot SPL 2023.04-dirty (May 17 2024 - 11:04:46 +0900)
    [0.848723 0.001014] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    [0.864454 0.015731] am62a_init: board_init_f done
    [0.865031 0.000577] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [0.866460 0.001429] Trying to boot from MMC1
    [0.991740 0.125280] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [1.010918 0.019178] Authentication passed
    [1.632189 0.621271] am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    [1.634759 0.002570] Authentication passed
    [2.368003 0.733244] 
    [2.368130 0.000127] 
    [2.368189 0.000059] U-Boot 2023.04-dirty (May 17 2024 - 11:04:46 +0900)
    [2.370167 0.001978] 
    [2.370211 0.000044] SoC:   AM62AX SR1.0 HS-FS
    [2.371082 0.000871] Model: Texas Instruments AM62A7 SK
    [2.372241 0.001159] DRAM:  2 GiB (effective 4 GiB)
    [2.655492 0.283250] Core:  58 devices, 28 uclasses, devicetree: separate
    [2.656384 0.000892] MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    [2.671869 0.015485] Loading Environment from nowhere... OK
    [2.672385 0.000516] In:    serial@2800000
    [2.672678 0.000293] Out:   serial@2800000
    [2.672964 0.000286] Err:   serial@2800000
    [2.688307 0.015343] Net:   eth0: ethernet@8000000port@1
    [2.703620 0.015313] Hit any key to stop autoboot:  0 
    [4.799743 2.096123] switch to partitions #0, OK
    [4.800679 0.000936] mmc0(part 0) is current device
    [4.831583 0.030904] SD/MMC found on device 0
    [4.847774 0.016192] Failed to load 'boot.scr'
    [4.848709 0.000935] Can't set block device
    [4.849487 0.000778] ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    [4.991552 0.142065] 20302336 bytes read in 133 ms (145.6 MiB/s)
    [5.023575 0.032023] 57364 bytes read in 22 ms (2.5 MiB/s)
    [5.024997 0.001422] Working FDT set to 88000000
    [5.026022 0.001025] ## Flattened Device Tree blob at 88000000
    [5.027428 0.001405]    Booting using the fdt blob at 0x88000000
    [5.028883 0.001455] Working FDT set to 88000000
    [5.055739 0.026856]    Loading Device Tree to 000000008feee000, end 000000008fffffff ... OK
    [5.072742 0.017003] Working FDT set to 8feee000
    [5.073294 0.000553] 
    [5.073319 0.000025] Starting kernel ...
    [5.088209 0.014890] 
    [5.088262 0.000053] [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [5.105923 0.017662] [    0.000000] Linux version 6.1.46-g247b2535b2 (oe-user@oe-host) (aarch64-oe-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Wed Dec  6 17:54:04 UTC 2023
    [5.121781 0.015858] [    0.000000] Machine model: Texas Instruments AM62A7 SK
    [5.123700 0.001919] [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [5.136450 0.012750] [    0.000000] printk: bootconsole [ns16550a0] enabled
    [5.343921 0.207471] [    0.056371] omap-mailbox 29030000.mailbox: no available mbox devices found
    [6.047687 0.703766] [    0.760937] tps6594-rtc tps6594-rtc.4.auto: hctosys: unable to read the hardware clock
    [6.064815 0.017128] [    0.775625] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [6.079996 0.015181] [    0.784080] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [6.082750 0.002754] [    0.791499] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [8.687854 2.605104] [    3.397968] systemd[1]: Failed to start Start psplash boot splash screen.
    [8.703536 0.015682] [FAILED] Failed to start Start psplash boot splash screen.
    [8.706453 0.002917] [DEPEND] Dependency failed for Starprogress communication helper.
    [9.519531 0.813078] [    4.221647] vdec 30210000.video-codec: error -ENXIO: IRQ index 0 not found
    [9.522591 0.003059] [    4.228680] vdec 30210000.video-codec: failed to get irq resource, falling back to polling
    [9.535577 0.012986] [    4.241511] k3-dsp-rproc 7e000000.dsp: booting DSP core using boot addr = 0x99a00000
    [16.527436 6.991859] 
    [16.527526 0.000090]  _____                    _____           _         _   
    [16.543735 0.016209] |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    [16.545622 0.001887] |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    [16.547521 0.001899] |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
    [16.559062 0.011541]               |___|                    |___|            
    [16.559503 0.000441] 
    [16.559513 0.000010] Arago Project am62axx-evm -
    [16.559744 0.000230] 
    [16.559754 0.000010] Arago 2023.10 am62axx-evm -
    [16.559978 0.000224] 
    [16.559988 0.000010] am62axx-evm login: 
    

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

    您好、Kim、

    SDK"默认"rootfs 具有许多用于 OOB 演示的组件、这会占用大量的启动时间。 您的项目中需要所有这些工具吗? 您是否可以使用"base" rootfs 进行测试、以了解它的启动时间是多少?

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

    您好、Liu

    base rootfs 是指 Tiny 吗?

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

    我目前没有访问我办公室中安装了所有 SDK 的计算机的权限、但基本 rootfs 应该被称为"tisdk-base-image..."。

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

    您好、Liu

    找不到 am62a 基本映像

    只有 edgeai,很小

    从哪里可以找到它?

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

    SDK9.1可能不提供基本映像。 您能否查看上个月发布的 SDK9.2?

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

    感谢您的支持。

    我们将继续进行基本映像测试、但必须使用 edgeai-image。

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

    我现在正在我的家用电脑上安装 SDK9.2、但它也不提供基本映像。

    您在 AM62Ax 上的应用是什么? 您的应用将使用哪些组件/接口? 我将看到我是否可以优化 edgeai-image 以使其在10秒内启动。

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

    我们的目标是启动摄像头、创建 DL 模型、并 在 edgeai-gst 中查看它。

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

    好的。

    您能否在 SDK9.2中尝试 falcon 模式以查看 vmalloc 错误是否仍然发生?

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

    我刚刚运行了一个测试、并出现相同的 vmalloc 错误。

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

    您好、Liu

    我应用了以下3项、启动时间为13 ~ 14秒。

    -在引导参数中添加了"quiet ",以抑制大多数内核引导日志;

    -删除/etc/systemd/system/multi-user.target.wants/gplv3-notice.service

    - 删除3秒 u-boot 启动延迟;

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

    在 uboot SPL 中启用 MMC ADMA 支持

    上述文本是否指的是以下内容?

    CONFIG_SPL_MMC_SDHCI_ADMA=y 

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

    有。 将此文件添加到 am62ax_evm_r5_defconfig 中。 这应该可以节省几百毫秒的启动时间。

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

    现在引导时间为12~13秒

    我们仍然需要减少2秒。

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

    接下来、请尝试删除 rootfs /etc/systemd/multi-user.target.wants 目录中不相关的服务。

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

    您好、Liu

    通过删除/etc/systemd/multi-user.target.wants 服务、我得到的平均启动时间约为12秒。 是否有任何可以在其他地方减少的东西?

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

    您好、Kim、

    您的项目使用以太网还是 USB? 否则、您可以在内核板 dts 中禁用未使用的接口以节省初始化时间。

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

    您好、Liu

    遗憾的是、使用的是以太网和 USB。 但是,通过禁用其他东西,我能够将平均时间减少到11秒。

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

    您好、Kim、

    您是否使用两个 USB 控制器? 如果没有、您是否禁用了未使用的功能?

    请从引导参数中删除"quiet (静默)"、并在内核引导日志中添加 timestemps、然后附加引导日志、我想查看还可以禁用哪些功能以节省引导时间。

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

    您好、Kim、

    请浏览此内核日志、并在内核配置或 DTS 中禁用不需要的模块/驱动程序。

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

    您好、Liu

    我按照你的指示、得到的平均启动时间约为10秒。 谢谢你。

    不在本线程中、我正在上传定制板上的 rootfs、但发生了错误。

    您能确认吗?

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1363819/am62a7-kernel-panic-boot-emmc

    此致、

    Kim

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

    我基本上遇到了同样的问题。  不确定我是否可以跳转到同一主题、或者我是否应该创建一个新主题。  我也在开发 AM62Ax、确切地说、就是 AM62A 低功耗 SK EVM。  我还实施了 Falcon 引导、虽然是从 NAND 而不是 eMMC。  另外、10次中有6次、modprobe 的 VMAP 分配失败、我必须重启 EVM。  我是否可以发布任何信息来帮助诊断根本原因?

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

    尊敬的 Jason:

    Kim 报告的 falcon 引导模式下的 vmalloc 问题仍然未解决、我还不知道根本原因。

    请针对您拥有的问题创建一个新的 e2e 主题。

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

    我的问题实际上是相同的问题。  我提供了其他设置来帮助进行故障排除。

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

    尊敬的 Jason:

    感谢您在此处报告问题。 如果你没有创建一个新的 e2e 线程、但是只需观察这个线程即可。

    尽管此线程是使用正常引导流程解决的、但在 falcon 模式下的 vmalloc 问题仍然存在。 我将继续对问题进行调试、并在调试完毕后立即报告该主题。 只需在这里设定期望、几周前我就在这个问题上花了一天的时间、这似乎并不简单。 因此、我可能需要一些时间才能找到根本原因。

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

    尊敬的 Jason:

    问题的根本原因已确定- falcon 引导中的内核映像加载地址未进行2MB 对齐。

    以下是解决此问题的方法:

    将以下补丁应用于 ATF 源代码、并重新编译 ATF。 该补丁将内核映像加载地址从0x80080000更改为0x80200000。

    diff --git a/plat/ti/k3/common/k3_bl31_setup.c b/plat/ti/k3/common/k3_bl31_setup.c
    index bbfb5bbfce1c..08fb296e7811 100644
    --- a/plat/ti/k3/common/k3_bl31_setup.c
    +++ b/plat/ti/k3/common/k3_bl31_setup.c
    @@ -80,6 +80,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
            bl33_image_ep_info.pc = PRELOADED_BL33_BASE;
            bl33_image_ep_info.spsr = k3_get_spsr_for_bl33_entry();
            SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE);
    +       NOTICE("BL33 base: 0x%x\n", PRELOADED_BL33_BASE);
     
     #ifdef K3_HW_CONFIG_BASE
            /*
    diff --git a/plat/ti/k3/platform.mk b/plat/ti/k3/platform.mk
    index bce9ef176b3c..f1a008ed4251 100644
    --- a/plat/ti/k3/platform.mk
    +++ b/plat/ti/k3/platform.mk
    @@ -13,7 +13,7 @@ include ${PLAT_PATH}/board/${TARGET_BOARD}/board.mk
     BL32_BASE ?= 0x9e800000
     $(eval $(call add_define,BL32_BASE))
     
    -PRELOADED_BL33_BASE ?= 0x80080000
    +PRELOADED_BL33_BASE ?= 0x80200000
     $(eval $(call add_define,PRELOADED_BL33_BASE))
     
     K3_HW_CONFIG_BASE ?= 0x82000000

    将新的 ATF 二进制文件 bl31.bin 复制到生成用于 falcon 引导的 tispl.bin 位置、并修改 tispl.it以将内核加载地址从0x80080000更新为0x800200000、如下所示。

    diff -u tispl.its.orig tispl.its
    --- tispl.its.orig      2024-05-13 10:24:36.778898086 -0500
    +++ tispl.its   2024-05-31 13:38:19.486587979 -0500
    @@ -42,8 +42,8 @@
                            os = "Linux";
                            arch = "arm64";
                            compression = "none";
    -                       load = <0x80080000>;
    -                       entry = <0x80080000>;
    +                       load = <0x80200000>;
    +                       entry = <0x80200000>;
                    };
                    fdt1 {
                            description = "kernel fdt";

    您好、Kim、

    如果需要、您可以应用这些更改、并在项目中使用 falcon 引导、以节省几秒钟的引导时间。 您所做的 kernel/Linux 优化仍然适用。

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

    您好、Liu

    感谢您的支持。

    但我仍然不理解这个短语。

    "falcon 引导中的内核映像加载地址没有2MB 对齐。"

    您能解释一下吗?

    此致、

    Kim

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

    您好、Kim、

    ARM64内核应以2MB 对齐的地址加载。

    在正常的 U-Boot 引导流程中、U-Boot 将内核映像加载并引导到$loadaddr、默认情况下为0x8200_0000、以2MB 对齐。

    但在 falcon 引导流程中、ATF 会将内核映像引导至预加载的_BL33_BASE (默认值为0x8008_0000)。

    因此、上面的补丁是修改 tispl.it以将内核加载到2MB 对齐的0x8020_0000、并修改 ATF 以在同一地址引导内核映像。

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

    我能够将2 MB 的对齐方式融入到我的 Falcon 构建中。  它确实解决了 VMAP 分配的问题。  感谢您花时间讨论此问题。