你好,恩智浦
我们使用引导加载程序启动 M 核心 + A 内核,M 内核配置了 llce_lin 输出;
s32g u-boot 跳转到内核,llce_lin 输出损坏,查询具体代码后找到;
u-boot 代码:bootm.c-> announce_and_cleanup ()->cleanup_before_linux (void)-> board_cleanup_before_linux ();-> scmi_reset_agent ();
我们发现,
由于调用 scmi_reset_agent 函数导致,M 内核配置 lce_lin 停止发送;由于 scmi(系统控制和管理接口)系统控制和管理接口 (SCMI) 是 启动 中的较低级别函数,内核,控制时钟、电源、io、RESET等,其中涉及 s32g 的底层控制逻辑;如何修改或配置为
解决导致 llce_lin 停止的 A-core 初始化问题?
致以最诚挚的问候
你好,@马松
感谢您的回复。
注释掉相应的行只是一种测试,并不是建议的解决问题的方法,因为这可能会影响到多个部分,从而导致像你发现的那样的问题。
我认为还需要进一步分析和测试,为了方便讨论和资源共享,请让我帮助创建一个支持案例来继续提供支持,我会直接通过邮件回复您。
很抱歉给您带来不便。
BR
切宁
嗨,chenyin
我现在有一些关于 S32G 时钟的问题,基本上和图片中的问题类似;
1. tf-a 初始化时钟后 tf-a 不会退出吗?
2. u-启动 和内核如何初始化或使用时钟,需要与 tf-a 通信?
3. 你能详细解释一下在 tf-a、u-启动 和内核中是如何使用 clk 的吗?
BR.
嗨,chenyin
感谢您的回复,
我测试了评论过的 scmi_reset_agent 函数,并确认在 u-启动-> 内核跳转期间 llce_lin 输出正常。
但是,我发现内核启动后有异常,比如无法访问eth0 ping,因为我不确定是否还有其他问题,所以我没有按照这条线索进行调查;
你建议我做这样的调查吗?
BR.
从U-Boot到Linux内核的过渡确实会影响外围设备的输出,包括与LLCE-LIN(低延迟通信引擎——本地互连网络)相关的外围设备的输出,尤其是在恩智浦S32G等复杂的嵌入式系统中。 这主要是由于 U-Boot 和 猴子型 Linux 内核管理和初始化硬件资源 的方式不同 。 我们使用引导加载程序启动 M 核心 + A 内核,M 内核配置了 llce_lin 输出;s32g u-boot 跳转到内核,llce_lin 输出损坏,查询... 但是,它们的用途不同,管理方式也大不相同。-> U-boot 设备树用于配置和初始化启动过程中所需的硬件元器件,而 Linux 内核则使用设备树来描述内核启动后的硬件配置
你好,@马松
感谢您的回复。
据我了解,U-boot 不会设置时钟,tfa 会在启动期间设置时钟。
对于当前的问题,您是否介意在测试时注释掉源代码中的 scmi_reset_agent,以检查您的测试是否仍然存在问题?
BR
切宁
嗨,nxp
我继续在 u-boot 中追踪代码后发现了以下内容:
调用链:scmi_reset_agent (void)->
devm_scmi_process_msg (dev,& scmi_msg)->
scmi_smccc_process_msg (struct udevice *dev, struct scmi_msg *msg)->
arm_smccc_smc (chan-> func_id, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &res);->
SMCCC smc
对程序集进行了最后的调用,我不知道相关的细节,那么这部分代码是做什么的?它对 M 核心的运行有何影响,如何才能跳过代码执行的这一部分。
BR.
你好,chenyin
请提出一个问题,我们现在按如下方式启动流程
bootloader (M7)-> tf-a (A53)-> u-boot (A53)-> 内核 (A53)
我们已经在引导加载程序中配置了 uart 时钟,tf-a 中没有配置 uart 时钟,也没有在 u-boot 中进行任何修改;
u-启动 中会重新配置 uart 模块和时钟吗?
BR.
你好,@马松
感谢您的回复。
我建议首先尝试检查 TFA 中的 UART 时钟及其来源。
BR
切宁
你好,切尼
我知道现在就是这样运行的。
你还有其他发现吗?
BR.
你好,@马松
感谢您的回复。
既然你的 tf-a、u-boot 中只保存 ddr、xbar_2x 时钟,你的意思是说 UART 和外围设备 PLL3 的时钟也被禁用并在启动加载程序中设置,而不是在 TF-A 中设置?(在 TFA/uBoot 中,TFA/uBoot 只能从启动加载程序继承时钟设置来驱动 UART?)
BR
切宁
你好,陈怡
u-启动 中的 clk 转储如下所示:
=> clk dump
Rate Usecnt Name
------------------------------------------
40000000 0 |-- fxosc@40050000
51000000 0 |-- firc
32000 0 |-- sirc
20000000 0 |--ftm0_ext
20000000 0 |-- ftm1_ext
125000000 0 |-- gmac0_ext_rx
125000000 0 |-- gmac0_ext_tx
50000000 0 |-- gmac0_rmii_ref
200000000 0 |-- gmac0_ext_ts
100000000 0 |-- serdes_100_ext
125000000 0 |-- serdes_125_ext
125000000 0 |-- serdes0_lane0_ext_cdr
125000000 0 |-- serdes0_lane0_ext_tx
125000000 0 |--serdes0_lane1_ext_cdr
125000000 0 |-- serdes0_lane1_ext_tx
125000000 0 |-- serdes1_lane0_ext_cdr
125000000 0 |-- serdes1_lane0_ext_tx
125000000 0 |-- serdes1_lane1_ext_cdr
125000000 0 |-- serdes1_lane1_ext_tx
1 0 |-- pfe_mac0_rmii
1 0 |-- pfe_mac1_rmii
1 0 |-- pfe_mac2_rmii
1000000000 0 |-- a53
400000000 1 |-- serdes_axi
51000000 1 |-- serdes_aux
133333333 1 |-- serdes_apb
100000000 1 |-- serdes_ref
80000000 0 |-- ftm0_sys
0 0 |-- ftm0_ext
80000000 0 |-- ftm1_sys
0 0 |-- ftm1_ext
133333333 0 |-- flexcan_reg
133333333 0 |-- flexcan_sys
40000000 0 |-- flexcan_can
200000000 0 |-- flexcan_ts
62500000 0 |-- linflex_xbar
125000000 1 |--linflex_lin
0 0 |-- gmac0_ts
125000000 0 |-- gmac0_rx_sgmii
125000000 0 |-- gmac0_tx_sgmii
125000000 1 |-- gmac0_rx_rgmii
125000000 1 |-- gmac0_tx_rgmii
0 0 |-- gmac0_rx_rmii
0 0 |-- gmac0_tx_rmii
0 0 |-- gmac0_rx_mii
0 0 |-- gmac0_tx_mii
400000000 1 |-- gmac0_axi
0 0 |-- spi_reg
0 0 |-- spi_module
133333333 0 |-- qspi_reg
133333333 0 |-- qspi_ahb
266666666 0 |-- qspi_flash2x
133333333 0 |--qspi_flash1x
400000000 0 |-- usdhc_ahb
133333333 0 |-- usdhc_module
400000000 1 |-- usdhc_core
32000 0 |-- usdhc_mod32k
133333333 0 |-- ddr_reg
800000000 0 |-- ddr_pll_ref
800000000 0 |-- ddr_axi
400000000 0 |-- sram_axi
133333333 0 |-- sram_reg
133333333 0 |-- i2c_reg
133333333 0 |-- i2c_module
66666666 0 |--siul2_reg
51000000 0 |-- siul2_filter
133333333 0 |-- crc_reg
133333333 0 |-- crc_module
100000000 0 |-- eim0_reg
100000000 0 |-- eim0_module
66666666 0 |-- eim123_reg
66666666 0 |-- eim123_module
66666666 0 |-- eim_reg
66666666 0 |-- eim_module
66666666 0 |-- fccu_module
51000000 0 |-- fccu_safe
66666666 0 |-- rtc_reg
32000 0 |-- rtc_sirc
51000000 0 |-- rtc_firc
133333333 0 |-- swt_module
51000000 0 |-- swt_counter
133333333 0 |-- stm_module
133333333 0 |-- stm_reg
133333333 0 |-- pit_module
133333333 0 |-- pit_reg
400000000 0 |-- edma_module
400000000 0 |-- edma_ahb
80000000 1 |-- sar_adc_bus
666666660 |-- cmu_module
66666666 0 |-- cmu_reg
133333333 0 |-- tmu_module
133333333 0 |-- tmu_reg
133333333 0 |-- flexray_reg
0 0 |-- flexray_pe
66666666 0 |--wkpu_module
66666666 0 |-- wkpu_reg
66666666 0 |-- src_module
66666666 0 |-- src_reg
66666666 0 |-- src_top_module
66666666 0 |-- src_top_reg
133333333 0 |-- ctu_module
80000000 0 |-- ctu_ctu
200000000 0 |-- dbg_sys4
400000000 0 |-- dbg_sys2
400000000 0 |-- m7
133333333 0 |-- dmamux_module
133333333 0 |-- dmamux_reg
500000000 0 | -- gic_module
133333333 0 | -- mscm_module
133333333 0 | -- mscm_reg
133333333 0 | -- sema42_module
133333333 0 |-- sema42_reg
66666666 0 |-- xrdc_module
66666666 0 |-- xrdc_reg
0 0 |-- clkout0
0 0 |-- clkout1
100000000 0 |-- usb_mem
32000 0 |-- usb_low
0 0 |--pfe0_rx_sgmii
0 0 ||-- pfe0_tx_sgmii
0 0 |-- pfe0_rx_rgmii
0 0 |-- pfe0_tx_rgmii
0 0 |-- pfe0_rx_rmii
0 0 |-- pfe0_tx_rmii
0 0 |-- pfe0_rx_mii
0 0 |--pfe0_tx_mii
0 0 ||-- pfe1_rx_sgmii
0 0 |-- pfe1_tx_sgmii
0 0 |-- pfe1_rx_rgmii
0 0 |-- pfe1_tx_rgmii
0 0 |-- pfe1_rx_rmii
0 0 |-- pfe1_tx_rmii
0 0 |--pfe1_rx_mii
0 0 |-- pfe1_tx_mii
0 0 |-- pfe2_rx_sgmii
0 0 |-- pfe2_tx_sgmii
0 0 |-- pfe2_rx_rgmii
0 0 |-- pfe2_tx_rgmii
0 0 |-- pfe2_rx_rmii
0 0 |-- pfe2_tx_rmii
0 0 |-- pfe2_rx_mii
0 0 |-- pfe2_tx_mii
300000000 0 |-- pfe_axi
300000000 0 |-- pfe_apb
600000000 0 |-- pfe_pe
0 0 |-- pfe_ts
40000000 0 |-- llce_can_pe
200000000 0 |-- llce_sys
80000000 0 `-- llce_per
1000000000 0 |-- a53
400000000 1 |-- serdes_axi
51000000 1 |-- serdes_aux
133333333 1 |-- serdes_apb
100000000 1 |-- serdes_ref
80000000 0 |-- ftm0_sys
0 0 |-- ftm0_ext
80000000 0 |-- ftm1_sys
0 0 |-- ftm1_ext
133333333 0 |--flexcan_reg
133333333 0 |-- flexcan_sys
40000000 0 |-- flexcan_can
200000000 0 |-- flexcan_ts
62500000 0 |-- linflex_xbar
125000000 1 |-- linflex_lin
0 0 |--gmac0_ts
125000000 0 |-- gmac0_rx_sgmii
125000000 0 |-- gmac0_tx_sgmii
125000000 1 |-- gmac0_rx_rgmii
125000000 1 |-- gmac0_tx_rgmii
0 0 |--gmac0_rx_rmii
0 0 |-- gmac0_tx_rmii
0 0 |-- gmac0_rx_mii
0 0 |-- gmac0_tx_mii
400000000 1 |-- gmac0_axi
0 0 |-- spi_reg
0 0 |-- spi_module
133333333 0 |--qspi_reg
133333333 0 |-- qspi_ahb
266666666 0 |-- qspi_flash2x
133333333 0 |-- qspi_flash1x
400000000 0 |-- usdhc_ahb
133333333 0 |-- usdhc_module
400000000 1 |-- usdhc_core
32000 0 |-- usdhc_mod32k
133333333 0 |-- ddr_reg
800000000 0 |-- ddr_pll_ref
800000000 0 |-- ddr_axi
400000000 0 |-- sram_axi
133333333 0 |-- sram_reg
133333333 0 |-- i2c_reg
133333333 0 |-- i2c_module
66666666 0 |-- siul2_reg
51000000 0 |-- siul2_filter
13333333333 0 |--crc_reg
133333333 0 |-- crc_module
100000000 0 |-- eim0_reg
100000000 0 |-- eim0_module
66666666 0 |-- eim123_reg
66666666 0 |-- eim123_module
66666666 0 |--eim_reg
66666666 0 |-- eim_module
66666666 0 |-- fccu_module
51000000 0 |-- fccu_safe
66666666 0 |-- rtc_reg
32000 0 |-- rtc_sirc
51000000 0 |--rtc_firc
133333333 0 |-- swt_module
51000000 0 |-- swt_counter
133333333 0 |-- stm_module
133333333 0 |-- stm_reg
13333333333 0 |-- pit_module
13333333333 0 |--pit_reg
400000000 0 |-- edma_module
400000000 0 |-- edma_ahb
80000000 1 |-- sar_adc_bus
66666666 0 |-- cmu_module
66666666 0 |-- cmu_reg
133333333 0 |-- tmu_module
133333333 0 |-- tmu_reg
133333333 0 |-- flexray_reg
0 0 |-- flexray_pe
66666666 0 |-- wkpu_module
66666666 0 |-- wkpu_reg
66666666 0 |--src_module
66666666 0 |-- src_reg
66666666 0 |-- src_top_module
66666666 0 |-- src_top_reg
133333333 0 |-- ctu_module
80000000 0 |-- ctu_ctu
200000000 0 |-- dbg_sys4
400000000 0 |-- dbg_sys2
400000000 0 |-- m7
133333333 0 |-- dmamux_module
133333333 0 |-- dmamux_reg
500000000 0 |-- gic_module
133333333 0 |-- mscm_module
133333333 0 |-- mscm_reg
133333333 0 |-- sema42_module
133333333 0 |-- sema42_reg
66666666 0 |--xrdc_module
66666666 0 |-- xrdc_reg
0 0 |-- clkout0
0 0 |-- clkout1
100000000 0 |-- usb_mem
32000 0 |-- usb_low
0 0 |-- pfe0_rx_sgmii
0 0 |-- pfe0_tx_sgmii
0 0 |-- pfe0_rx_rgmii
0 0 |-- pfe0_tx_rgmii
0 0 |-- pfe0_rx_rmii
0 0 |-- pfe0_tx_rmii
0 0 |-- pfe0_rx_mii
0 0 |-- pfe0_tx_mii
0 0 |-- pfe1_rx_sgmii
0 0 |-- pfe1_tx_sgmii
0 0 |--pfe1_rx_rgmii
0 0 ||-- pfe1_tx_rgmii
0 0 ||-- pfe1_rx_rmii
0 0 |-- pfe1_tx_rmii
0 0 |-- pfe1_rx_mii
0 0 |-- pfe1_tx_mii
0 0 |-- pfe2_rx_sgmii
0 0 ||-- pfe2_tx_sgmii
0 0 ||-- pfe2_rx_rgmii
0 0 |-- pfe2_tx_rgmii
0 0 |-- pfe2_rx_rmii
0 0 |-- pfe2_tx_rmii
0 0 |-- pfe2_rx_mii
0 0 |-- pfe2_tx_mii
300000000 0 |-- pfe_axi
300000000 0 |-- pfe_apb
600000000 0 |-- pfe_pe
0 0 |-- pfe_ts
40000000 0 |-- llce_can_pe
200000000 0 |-- llce_sys
80000000 0 |-- llce_per
嗨,chenyin
1. Lin 时钟在引导加载程序中配置;
2. 我们使用 bsp42,在 tf-a、u-boot 中只保存 ddr、xbar_2x 时钟,所有其他配置都处于关闭状态,具体取决于启动加载程序的配置;
BR.
你好,@马松
谢谢您的帖子。
1.我想知道 LIN 时钟是在引导加载程序中配置的,还是在 M7 内核上运行的 LIN 应用程序中配置的?
2。您的测试设置中使用的是哪个版本的电路板支持包?对时钟设置有任何修改吗?你介意分享你的 u-启动 中的时钟转储吗?
BR
切宁