Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    R528-S3 内核崩溃__invoke_psci_fn_smc

    Linux
    2
    5
    2250
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      HQEmbed LV 5 last edited by

      R528-S3上手,直接买芯片做的板,内核中配置PSCI会导致内核挂掉,报错__invoke_psci_fn_smc,而T113不会报这个错。

      去掉PSCI选项呢,跑起来又只看到单核, 3个板都如此,难道买到次品芯片了?

      各位大神有遇到这啥情况不?

      IMG_20230406_124850_edit_8812592341363.jpg

      H WhycanService 2 Replies Last reply Reply Quote Share 0
      • H
        HQEmbed LV 5 @HQEmbed last edited by

        @hqembed __invoke_psci_fn_smc.png

        1 Reply Last reply Reply Quote Share 0
        • WhycanService
          WhycanService LV 8 @HQEmbed last edited by WhycanService

          @hqembed 在 R528-S3 内核崩溃__invoke_psci_fn_smc 中说:

          __invoke_psci_fn_smc

          看上去是optee那边的锅,psci是启smp的,对不上optee就会导致tee异常处理
          先跳过 OPTEE ,在 device/config/chips/r528/configs/xxx/ 新建一个 boot_package.cfg

          写入以下内容

          [package]
          item=u-boot, u-boot.fex
          item=dtb,    sunxi.fex
          

          然后找到 lichee/linux-5.4/arch/arm/boot/dts/sun8iw20p1.dtsi 中的 psci 节点把他删了

          psci {
          	compatible = "arm,psci-1.0";
          	method = "smc";
          };
          

          在 lichee/linux-5.4/arch/arm/mach-sunxi/platsmp.c 加一下

          static int sun8i_t113_smp_boot_secondary(unsigned int cpu,
          				    struct task_struct *idle)
          {
              u32 reg;
              void __iomem *cpucfg_membase = ioremap(0x09010000, 0x10);
              void __iomem *cpuexec_membase[] = {ioremap(0x070005C4, 0x10),ioremap(0x070005C8, 0x10)};
          	
          	if (cpu != 1)
          	    return 0;
          
          	spin_lock(&cpu_lock);
          
          	writel(__pa_symbol(secondary_startup),	cpuexec_membase[cpu]);
          
          	reg = readl(cpucfg_membase);
          	writel(reg | BIT(cpu), cpucfg_membase);
          
          	spin_unlock(&cpu_lock);
          
          	return 0;
          }
          
          static const struct smp_operations sun8i_t113_smp_ops __initconst = {
          	.smp_boot_secondary	= sun8i_t113_smp_boot_secondary,
          };
          CPU_METHOD_OF_DECLARE(sun8i_t113_smp, "allwinner,sun8iw20p1", &sun8i_t113_smp_ops);
          
          H 1 Reply Last reply Reply Quote Share 0
          • H
            HQEmbed LV 5 @WhycanService last edited by

            @whycanservice 感谢,我试试,刚好功能全测完,只剩下这个问题。
            是OPTEE打包后直接挂,所以去掉了OPTEE,结果又遇到SMP问题。

            OPTEE.png

            1 Reply Last reply Reply Quote Share 0
            • H
              HQEmbed LV 5 last edited by

              好,2个CPU都起来了,OPTEE有需要时再看,暂时用不上。
              smp.png

              1 Reply Last reply Reply Quote Share 0
              • 1 / 1
              • First post
                Last post

              Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

              行为准则 | 用户协议 | 隐私权政策