Navigation

    全志在线开发者论坛

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

    T113 Tina Linux 禁用 OPTEE 启动

    其它全志芯片讨论区
    2
    2
    2587
    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.
    • YuzukiTsuru
      柚木 鉉 LV 9 last edited by WhycanService

      1. 在 device/config/chips/t113/configs/<aaa>/ 新建一个 boot_package.cfg

      写入以下内容

      [package]
      item=u-boot, u-boot.fex
      item=dtb,    sunxi.fex
      
      1. 找到 lichee/linux-5.4/arch/arm/boot/dts/sun8iw20p1.dtsi 中的 psci 节点把他删了
      psci {
      	compatible = "arm,psci-1.0";
      	method = "smc";
      };
      
      1. 打开 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);
      
      1 Reply Last reply Reply Quote Share 0
      • tigger
        tigger LV 7 last edited by

        OPTEE 用来干嘛的呢?

        1 Reply Last reply Reply Quote Share 0
        • Referenced by  L liangzhicheng 
        • 1 / 1
        • First post
          Last post

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

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