AR# 69143

Zynq UltraScale+ MPSoC: Connecting XSDB to Linux CPU idle

描述

In Zynq UltraScale+ MPSoC/RFSoC devices, Linux CPU Idle is enabled by default.

When enabled, Linux powers down the CPU cores when they are idling (as opposed to WFI).

That can cause problems when xsdb is connected.

解决方案

Symptoms:

With CPU Idle is enabled, DAP issues an error. 

In theory, when xsdb is connected, there should be some read/write access happening over the A53_* related registers. 

Because the A53_* cores could be powered down based on the CPU usage stats due to CPU_IDLE being enabled, the xsdb accesses to the A53 registers can result in a DAP error.

There are two independent events happening here: 

CPUs being powered down, and xsdb trying to access the registers. 

As a result, when the xsdb triggers a read, if the A53_* core is powered down, it can result in a DAP error. 

In general, the debugger checks if the block is powered up or not. 

However, this event might occur when the read is already in progress, and will cause this issue.

 

Work-around (This applies to all Xilinx software releases for Zynq UltraScale+ devices):

The problem can be avoided by disabling the CPU Idle in Linux kernel bootargs using any of the below methods.

1) Disabling from a U-boot prompt on target:

Append "cpuidle.off=1" to your existing bootargs as follows: (identify the bootargs from the <plnx-proj-root>/components/plnx_workspace/device-tree/device-tree/system-conf.dtsi file)

ZynqMP> setenv bootargs 'console=ttyPS0,115200n8 earlycon clk_ignore_unused cpuidle.off=1'
ZynqMP> run bootcmd

 

2) Disable from the kernel config (CONFIG_CPU_IDLE) using PetaLinux or Yocto:

PetaLinux:

$ petalinux-config -c kernel

CPU Power Management --->
  -> CPU Idle --->
        [ ] CPU idle PM support

Clean and rebuild the kernel using petalinux commands.

$ petalinux-build -c kernel -x cleansstate
$ petalinux-build -c kernel

Yocto: 

$ bitbake -c menuconfig virtual/kernel

CPU Power Management --->
  -> CPU Idle --->
        [ ] CPU idle PM support

Clean and rebuild the kernel using bitbake commands.

$ bitbake -c cleansstate virtual/kernel
$ bitbake virtual/kernel

3) Using the PetaLinux device-tree generator:

Append "cpuidle.off=1" to your existing bootargs as follows, then copy the chosen node properties from "<plnx-proj-root>/components/plnx_workspace/device-tree/device-tree/system-conf.dtsi" file to "<plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi"

/ {
   chosen {
      bootargs = "earlycon console=ttyPS0,115200 clk_ignore_unused cpuidle.off=1";
      stdout-path = "serial0:115200n8";
   };
};

Clean and rebuild the device-tree:

$ petalinux-build -c device-tree -x cleansstate
$ petalinux-build -c device-tree

链接问答记录

子答复记录

Answer Number 问答标题 问题版本 已解决问题的版本
75401 Zynq UltraScale+ MPSoC/RFSoC: Linux or U-Boot reboot hangs when XSCT debugger is connected N/A N/A

相关答复记录

Answer Number 问答标题 问题版本 已解决问题的版本
75401 Zynq UltraScale+ MPSoC/RFSoC: Linux or U-Boot reboot hangs when XSCT debugger is connected N/A N/A
AR# 69143
日期 07/24/2020
状态 Active
Type 综合文章
器件
Tools More Less
Boards & Kits