Hello all!
I have a custom designed board with LS1046a processor. I want to put several processor cores into idle state and in order to do that I built the Linux kernel with the specific configuration options as told in the Layerscape processor sdk user guide(Chapter 11.1). My problem is that it seems that the driver not loaded, because when I check that it is loaded this is the output:
root@localhost:~# cat /sys/devices/system/cpu/cpuidle/current_driver
none
I even checked that the driver loaded at boot time:
root@localhost:~# dmesg | grep cpuidle
[ 0.282299] cpuidle: using governor ladder
[ 0.282362] cpuidle: using governor menu
Is there something that I miss out?
Thanks!
Please configure your Linux Kernel based on the attached default Linux Kernel configuration file provided in LSDK 20.12.
Please go to folder flexbuild_lsdk2012/build/linux/linux/arm64/LS/output/LSDK-20.12-V5.4, copy the attached .config file to this folder, then run "make ARCH=arm64 menuconfig" to add your own Kernel configurations, generate Linux Kernel image with command "flex-builder -c linux -m ls1046ardb".
If your problem remains, please provide your Linux Kernel configuration file(.config) file.
On your PC:
wget https://www.nxp.com/lgfiles/sdk/lsdk2012/lsdk2012_yocto_tiny_LS_arm64.itb
On the target board:
=> tftp 0xa0000000 b25805/ls1046ardb/lsdk2012_yocto_tiny_LS_arm64.itb
=> bootm 0xa0000000#ls1046ardb
If the following error message is still in the boot up log. It means there is hardware problem on your target board, please check RCW configuration on your custom board.
[ 0.031472] cpuidle: using governor ladder
[ 0.061472] cpuidle: using governor menu
[ 3.311811] CPUidle arm: CPU 0 failed to init idle CPU ops
This kernel is not booting:
[ 4.077777] usbhid: USB HID core driver
[ 4.082976] Freescale USDPAA process driver
[ 4.087174] fsl-usdpaa: no region found
[ 4.091019] Freescale USDPAA process IRQ driver
[ 4.098818] optee: probing for conduit method from DT.
[ 4.103975] ------------[ cut here ]------------
[ 4.108588] kernel BUG at /home/jenkins/ci/lsdk/master/all/packages/linux/linux/arch/arm64/kernel/traps.c:405!
[ 4.118592] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 4.124073] Modules linked in:
[ 4.127124] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.4.47 #3
[ 4.133039] Hardware name: LS1046A RDB Board (DT)
[ 4.137739] pstate: 00000005 (nzcv daif -PAN -UAO)
[ 4.142530] pc : do_undefinstr+0x260/0x318
[ 4.146620] lr : do_undefinstr+0x1c0/0x318
[ 4.150710] sp : ffff80001003bb50
[ 4.154017] x29: ffff80001003bb50 x28: ffff00087706a040
[ 4.159327] x27: ffff800011c7a068 x26: ffff800011b78458
[ 4.164636] x25: ffff8000115cd000 x24: 0000000000000000
[ 4.166513] random: crng init done
[ 4.169944] x23: 0000000080000005 x22: ffff800010096f58
[ 4.178646] x21: ffff80001003bcf0 x20: ffff80001003bbb0
[ 4.183954] x19: ffff800012159000 x18: ffffffffffffffff
[ 4.189262] x17: 00000000bd48380c x16: 00000000a347fb58
[ 4.194570] x15: ffff800012159908 x14: ffffffffffffffff
[ 4.199878] x13: 0000000000000018 x12: 0101010101010101
[ 4.205186] x11: 0000000000000018 x10: 0101010101010101
[ 4.210495] x9 : ffffffffffffffff x8 : ffff80001003bd88
[ 4.215803] x7 : 0000000000000000 x6 : ffff80001003bba8
[ 4.221112] x5 : 00000000d5300000 x4 : ffff800012166830
[ 4.226419] x3 : 00000000d4000000 x2 : 0000000000000000
[ 4.231728] x1 : ffff00087706a040 x0 : 0000000080000005
[ 4.237036] Call trace:
[ 4.239475] do_undefinstr+0x260/0x318
[ 4.243220] el1_undef+0x10/0x84
[ 4.246446] __arm_smccc_smc+0x0/0x2c
[ 4.250104] optee_driver_init+0x144/0x66c
[ 4.254195] do_one_initcall+0x5c/0x1b0
[ 4.258026] kernel_init_freeable+0x1a4/0x24c
[ 4.262379] kernel_init+0x10/0x108
[ 4.265862] ret_from_fork+0x10/0x18
[ 4.269433] Code: f94013b5 17fffff1 a9025bb5 f9001bb7 (d4210000)
[ 4.275531] ---[ end trace 67e76dff654e1d91 ]---
[ 4.280144] note: swapper/0[1] exited with preempt_count 1
[ 4.285626] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 4.293283] SMP: stopping secondary CPUs
[ 4.297202] Kernel Offset: disabled
[ 4.300685] CPU features: 0x0002,20006000
[ 4.304688] Memory Limit: none
[ 4.307739] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
What does this optee do?
On your target board, please check whether CONFIG_ARM_CPUIDLE is enabled.
root@localhost:~# zcat /proc/config.gz | grep CONFIG_ARM_CPUIDLE
CONFIG_ARM_CPUIDLE=y
Please configure Linux Kernel as the following.
Kernel configure tree view options Description
CPU Power Management --->
CPU Idle --->
[*] CPU idle PM support
[*] Ladder governor (for periodic timer tick)
-*- Menu governor (for tickless system)
Arm CPU Idle Drivers --->
[*] Generic Arm/Arm64 CPU idle Driver
CONFIG_ARM_CPUIDLE is enabled, and I compiled with these configs but still not loaded.
I tried with the QORIQ SDK. There is something wrong with the cpuidle-arm driver, because the bootlog says:
[ 0.031472] cpuidle: using governor ladder
[ 0.061472] cpuidle: using governor menu
[ 3.311811] CPUidle arm: CPU 0 failed to init idle CPU ops
In the cpuidle-arm.c file the arm_cpuidle_init(cpu) function returns with error:
for_each_possible_cpu(cpu) {
ret = arm_cpuidle_init(cpu);
/*
* Skip the cpuidle device initialization if the reported
* failure is a HW misconfiguration/breakage (-ENXIO).
*/
if (ret == -ENXIO)
continue;
if (ret) {
pr_err("CPU %d failed to init idle CPU ops\n", cpu);
goto out_fail;
}