linux内核调试-printk
----------------------------------------------------------------------------------------------------------------------------
内核版本:linux 5.2.8
根文件系统:busybox 1.25.0
u-boot:2016.05
----------------------------------------------------------------------------------------------------------------------------
一、printk
介绍
我们在学习C
语言的时候,经常使用printf
函数将内容输出到控制台,printf
是格式化输出函数,主要功能是向标准输出设备按规定格式输出信息。printf
是C
语言标准库函数,定义于头文件 <stdio.h>
。
而在linux
内核中是无法使用printf
函数的,取而代之的是printk
函数。printk
在内核源码中用来记录日志信息的函数,只能在内核源码范围内使用,用法类似于printf
函数。
一个较大的差别在于printk
支持多种日志级别,从而允许printk
根据消息的等级选择性进行打印。
printk
函数主要做两件事情:
- 将信息记录日志文件中(一般为
/var/log/message
); - 调用控制台驱动来将信息输出到控制台;
1.1 日志缓冲区
printk
将内核日志输出到内核日志缓冲区中,缓冲区定义在在kernel/printk/printk.c
文件中:
/* record buffer */
#define LOG_ALIGN __alignof__(struct printk_log)
#define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT)
#define LOG_BUF_LEN_MAX (u32)(1 << 31)
static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN);
static char *log_buf = __log_buf;
static u32 log_buf_len = __LOG_BUF_LEN;
内核日志缓冲区__log_buf
的大小为\(2^{CONFIG\_LOG\_BUF\_SHIFT}\) ,CONFIG_LOG_BUF_SHIFT
默认为17
,即128KB
,可以通过make menuconfig
配置,对应的配置项为LOG_BUF_SHIFT
。
用户态可以通过syslog
相关的系统调用或者/proc
文件以及/dev/kmsg
设备节点来查看__log_buf
的信息,这些操作都是通过do_syslog
的系统调用接口来实现的。
1.2 日志级别
日志级别用来控制printk
打印的这条信息是否在控制台上显示,linux
内核共提供了8
种不同的日志级别,分为级别0~7
。数值越大,表示级别越低,对应的消息越不重要。
linux
内核日志级别相应的宏定义在include/linux/kern_levels.h
文件中。
#define KERN_EMERG KERN_SOH "0" /* system is unusable */
#define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
#define KERN_CRIT KERN_SOH "2" /* critical conditions */
#define KERN_ERR KERN_SOH "3" /* error conditions */
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
#define KERN_NOTICE KERN_SOH "5" /* normal but significant condition */
#define KERN_INFO KERN_SOH "6" /* informational */
#define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
#define KERN_DEFAULT "" /* the default kernel loglevel */
各个日志级别含义如下:
KERN_EMERG
表示紧急事件,一般是系统崩溃之前提示的消息;KERN_ALERT
表示必须立即采取行动的消息;KERN_CRIT
表示临界状态,通常涉及严重的硬件或软件操作失败;KERN_ERR
用于报告错误状态,设备驱动程序会经常使用该级别来报告来自硬件的问题;KERN_WARNING
对可能出现问题的情况进行警告,这类情况通常不会对系统造成严重的问题;KERN_NOTICE
表示有必要进行提示的正常情形,许多与安全相关的状况用这个级别进行汇报;KERN_INFO
表示内核提示信息,很多驱动程序在启动的时候,用这个级别打印出它们找到的硬件信息;KERN_DEBUG
用于调试信息。
1.3 函数使用
在使用printk
时,会将日志级别放到最开始的位置,使用方式如下:
printk(log_level "message...");
例如:
printk(KERN_EMERG "GetIot: KERN_EMERG\n");
printk(KERN_ALERT "GetIot: KERN_ALERT\n");
printk(KERN_CRIT "GetIot: KERN_CRIT\n");
printk(KERN_ERR "GetIot: KERN_ERR\n");
printk(KERN_WARNING "GetIot: KERN_WARNING\n");
printk(KERN_NOTICE "GetIot: KERN_NOTICE\n");
printk(KERN_INFO "GetIot: KERN_INFO\n");
printk(KERN_DEBUG "GetIot: KERN_DEBUG\n");
若未设置日志级别,printk
默认使用内核定义的全局变量default_message_loglevel
作为的默认打印的日志级别。
当printk
中的消息日志级别小于当前控制台日志级别时,printk
要打印的信息才会在控制台打印出来,否则不会显示在控制台。
printk
的用法与printf
基本一致, 最大的区别是《printk
对%p
》的扩展,在应用层使用printf
打印一个指针的地址时直接使用%p
即可, 但是内核为了防止泄漏内存布局的敏感信息,直接使用%p
输出的地址是经过hash
处理的, 如果想实现和printf
的%p
一样的效果,printk
需要使用%px
。
1.4 查看日志
无论当前控制台日志级别是何值,即使没有在控制台打印出来,都可以通过下面两种方法查看日志:
- 第一种是使用
dmesg
命令查看日志; - 第二种是通过
cat /proc/kmsg
来查看日志;
另外如果配置好并运行了syslogd
或klogd
,没有在控制台上显示的printk
的信息也会追加到/var/log/messages.log
中。
1.4.1 dmesg
执行dmesg
查看日志:
[root@zy:/]# dmesg
Booting Linux on physical CPU 0x0
Linux version 5.2.8 (root@zhengyang) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #23 Sun Mar 26 14:53:14 CST 2023
1.4.2 /proc/kmsg
执行cat /proc/kmsg
查看日志:
[root@zy:/]# cat /proc/kmsg
<6>Booting Linux on physical CPU 0x0
<5>Linux version 5.2.8 (root@zhengyang) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #23 Sun Mar 26 14:53:14 CST 2023
1.5 调整日志级别
linux
系统支持在运行时,通过proc
文件系统查看和调整内核日志的输出等级。查看当前控制台的打印级别的命令如下:
[root@zy:/]# cat /proc/sys/kernel/printk
7 4 1 7
该文件有4个数字值,含义如下:
- 控制台日志级别:优先级高于该值的消息将被打印至控制台;
- 默认的消息日志级别:将用该优先级来打印没有优先级的消息(即
printk
没有指定消息级别); - 最低的控制台日志级别:控制台日志级别可被设置的最小值(最高优先级);
- 默认的控制台日志级别:控制台日志级别的缺省值,如果没有指定控制台日志级别,则使用这个;
这四个值是在kernel/printk/printk.c
中被定义的,如下:
int console_printk[4] = {
CONSOLE_LOGLEVEL_DEFAULT, /* console_loglevel */
MESSAGE_LOGLEVEL_DEFAULT, /* default_message_loglevel */
CONSOLE_LOGLEVEL_MIN, /* minimum_console_loglevel */
CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */
};
EXPORT_SYMBOL_GPL(console_printk);
修改日志级别有两种方式,配置menuconfig
和修改/proc/sys/kernel/printk
文件。
1.5.1 配置menuconfig
修改CONFIG_MESSAGE_LOGLEVEL_DEFAULT
的值,然后重新编译,更新内核。menuconfig
配置路径如下:
Kernel hacking --->
printk and dmesg options --->
(4) Default message log level (1-7)
如下图所示:
1.5.2 在系统中修改
在系统运行期间,可以通过执行以下命令,修改当前控制态的日志级别:
echo "新的打印级别 4 1 7" > /proc/sys/kernel/printk
如屏蔽掉所有的内核printk
打印,只需要把第一个数值调到最小值1或者0,此时可以敲如下命令:
echo "1 4 1 7" > /proc/sys/kernel/printk
1.5.3 打开调试日志
内核中的大部分驱动都使用了dev_dbg
接口打印调试信息,日志级别为7,默认是不会输出到控制台的。
在需要打印dev_dbg
调试信息的驱动文件开头定义DEBUG
宏,注意必须是在include/linux/device.h
前面:
#define DEBUG
或者在需要打印的功能模块的Makefile
中追加:
subdir-ccflags-y := -DDEBUG
打开DEBUG
宏是第一步,这个时候还是不能输出到控制台的,还必须要修改控制台日志级别为8。
1.6 内核启动卡住排查
我们在移植linux
内核的时候,经常会遇到内核卡住的问题,这个时候如果想查看内核启动日志可以参考文章《Rockchip RK3399
- 移植linux 5.2.8
》最后一章。
以下是我帮朋友调试一个自制rk3588
开发版遇到的问题,编译使用的Rockchip Linux SDK
,编译使用的板级配置rockchip_rk3588_evb7_v11_defconfig
。
内核配置文件使用:kernel/arch/arm64/configs/rockchip_linux_defconfig
;
内核设备树使用:kernel/arch/arm64/boot/dts/rockchip/rk3588-evb7-v11-linux.dts
;
烧录之后卡在:
.....
[ 1.642185] io scheduler mq-deadline registered
[ 1.642188] io scheduler kyber registered
[ 1.642541] rockchip-csi2-dphy-hw fedc0000.csi2-dphy0-hw: csi2 dphy hw probe successfully!
[ 1.642603] rockchip-csi2-dphy-hw fedc8000.csi2-dphy1-hw: csi2 dphy hw probe successfully!
1.6.1 System
定位驱动模块加载顺序
全局搜索:
root@ubuntu:/work/sambashare/rk3588/rockchip# grep "csi2 dphy hw probe successfully" kernel/drivers/* -nR
kernel/drivers/phy/rockchip/phy-rockchip-csi2-dphy-hw.c:1061: dev_info(dev, "csi2 dphy hw probe successfully!\n");
驱动文件kernel/drivers/phy/rockchip/phy-rockchip-csi2-dphy-hw.c
:
#if defined(CONFIG_VIDEO_ROCKCHIP_THUNDER_BOOT_ISP) && !defined(CONFIG_INITCALL_ASYNC)
subsys_initcall(rockchip_csi2_dphy_hw_init);
#else
#if !defined(CONFIG_VIDEO_REVERSE_IMAGE) # 走这里
module_platform_driver(rockchip_csi2_dphy_hw_driver);
#endif
#endif
在linux
内核编译后,会在根目录下生成一个System.map
文件。该文件记录了内核中所有符号的地址和名称,包括驱动模块的初始化函数。通过查看System.map
文件,可以了解驱动模块的加载顺序;
ffffffc009905c70 d __initcall__kmod_phy_core__412_1168_phy_core_init6
# 设备树匹配
ffffffc009905c74 d __initcall__kmod_phy_rockchip_csi2_dphy_hw__327_1094_rockchip_csi2_dphy_hw_driver_init6
# 设备树匹配
ffffffc009905c78 d __initcall__kmod_phy_rockchip_csi2_dphy__384_1095_rockchip_csi2_dphy_driver_init6
# 设备树不匹配,跳过
ffffffc009905c7c d __initcall__kmod_phy_rockchip_dp__365_147_rockchip_dp_phy_driver_init6
# 设备树不匹配,跳过
ffffffc009905c80 d __initcall__kmod_phy_rockchip_emmc__365_395_rockchip_emmc_driver_init6
# 设备树不匹配,跳过
ffffffc009905c84 d __initcall__kmod_phy_rockchip_inno_dsidphy__366_1011_inno_dsidphy_driver_init6
ffffffc009905c88 d __initcall__kmod_phy_rockchip_inno_usb2__405_4142_rockchip_usb2phy_driver_init6
ffffffc009905c8c d __initcall__kmod_phy_rockchip_inno_usb3__396_1109_rockchip_u3phy_driver_init6
ffffffc009905c90 d __initcall__kmod_phy_rockchip_mipi_rx__336_1893_rockchip_isp_mipidphy_driver_init6
ffffffc009905c94 d __initcall__kmod_phy_rockchip_naneng_combphy__365_1309_rockchip_combphy_driver_init6
ffffffc009905c98 d __initcall__kmod_phy_rockchip_naneng_edp__655_474_rockchip_edp_phy_driver_init6
ffffffc009905c9c d __initcall__kmod_phy_rockchip_pcie__370_437_rockchip_pcie_driver_init6
ffffffc009905ca0 d __initcall__kmod_phy_rockchip_samsung_dcphy__380_2459_samsung_mipi_dcphy_driver_init6
ffffffc009905ca4 d __initcall__kmod_phy_rockchip_samsung_hdptx__1125_1229_rockchip_hdptx_phy_driver_init6
ffffffc009905ca8 d __initcall__kmod_phy_rockchip_snps_pcie3__365_299_rockchip_p3phy_driver_init6
ffffffc009905cac d __initcall__kmod_phy_rockchip_typec__365_1943_rockchip_typec_phy_driver_init6
ffffffc009905cb0 d __initcall__kmod_phy_rockchip_usb__384_1113_rockchip_usb_driver_init6
# 有问题的驱动
ffffffc009905cb4 d __initcall__kmod_phy_rockchip_usbdp__470_1670_rockchip_udphy_driver_init6
ffffffc009905cb8 d __initcall__kmod_gpio_generic__310_816_bgpio_driver_init6
ffffffc009905cbc d __initcall__kmod_pwm_rockchip__309_648_rockchip_pwm_driver_init6
......
一共有三列:地址、区域、操作。在操作中我们可以看到我们声明的驱动的名字。
可以看到rockchip_csi2_dphy_hw_driver
驱动完之后应该执行rockchip_csi2_dphy_driver
驱动;
root@ubuntu:/work/sambashare/rk3588/rockchip# grep "rockchip_csi2_dphy_driver" kernel/drivers/phy/* -nR
kernel/drivers/phy/rockchip/phy-rockchip-csi2-dphy.c:1076:struct platform_driver rockchip_csi2_dphy_driver = {
kernel/drivers/phy/rockchip/phy-rockchip-csi2-dphy.c:1088: return platform_driver_register(&rockchip_csi2_dphy_driver);
kernel/drivers/phy/rockchip/phy-rockchip-csi2-dphy.c:1095:module_platform_driver(rockchip_csi2_dphy_driver);
注意:驱动执行的前提是设备树使能了对应的设备节点。
为此修改rockchip_csi2_dphy_probe
,追加具有标志性的日志:
dev_info(dev,"--------------rockchip_csi2_dphy_probe come in");
重新编译并烧录到开发板。
依次类推,我们可以在后面每个驱动的probe
函数中加入类似的输入日志,然后可以定位到最终是哪个驱动卡住,不过这种做法比较费时。
1.6.2 打开debug
日志
对于我当前遇到的内核启动卡住问题,我个人倾向于drm
驱动和phy
驱动存在问题,因此我开启这两个驱动模块的debug
日志。
修改kernel/drivers/phy/Makefile
、kernel/drivers/gpu/drm/rockchip/Makefile
,编译debug
日志;
subdir-ccflags-y := -DDEBUG
设置控制台默认打印级别:
Kernel hacking --->
printk and dmesg options --->
(8) Default message log level (1-7)
kernel/arch/arm64/configs/rockchip_linux_defconfig
新增:
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=8
编译烧录:
[ 1.644574] io scheduler mq-deadline registered
[ 1.644577] io scheduler kyber registered
[ 1.644922] rockchip-csi2-dphy-hw fedc0000.csi2-dphy0-hw: csi2 dphy hw probe successfully!
[ 1.644987] rockchip-csi2-dphy-hw fedc8000.csi2-dphy1-hw: csi2 dphy hw probe successfully!
[ 1.651284] rockchip-usbdp-phy fed80000.phy: failed to find dp lan
通过输出日志,我猜测 rockchip-usbdp-phy
驱动可能问题。
1.6.2.1 禁用usbdp_phy0/1
设备节点
定位设备树文件kernel/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
;
usbdp_phy0: phy@fed80000 {
compatible = "rockchip,rk3588-usbdp-phy";
reg = <0x0 0xfed80000 0x0 0x10000>;
rockchip,u2phy-grf = <&usb2phy0_grf>;
rockchip,usb-grf = <&usb_grf>;
rockchip,usbdpphy-grf = <&usbdpphy0_grf>;
rockchip,vo-grf = <&vo0_grf>;
clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>,
<&cru CLK_USBDP_PHY0_IMMORTAL>,
<&cru PCLK_USBDPPHY0>,
<&u2phy0>;
clock-names = "refclk", "immortal", "pclk", "utmi";
resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>,
<&cru SRST_USBDP_COMBO_PHY0_CMN>,
<&cru SRST_USBDP_COMBO_PHY0_LANE>,
<&cru SRST_USBDP_COMBO_PHY0_PCS>,
<&cru SRST_P_USBDPPHY0>;
reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb";
status = "disabled";
usbdp_phy0_dp: dp-port {
#phy-cells = <0>;
status = "disabled";
};
usbdp_phy0_u3: u3-port {
#phy-cells = <0>;
status = "disabled";
};
};
在kernel/arch/arm64/boot/dts/rockchip/rk3588-evb7-v11.dtsi
中;
# USB3.0/DP Combo PHY0
&usbdp_phy0 {
orientation-switch;
svid = <0xff01>;
sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
port {
#address-cells = <1>;
#size-cells = <0>;
usbdp_phy0_orientation_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_orien_sw>;
};
usbdp_phy0_dp_altmode_mux: endpoint@1 {
reg = <1>;
remote-endpoint = <&dp_altmode_mux>;
};
};
};
修改kernel/arch/arm64/boot/dts/rockchip/rk3588-evb7-v11-linux.dts
新增:
# USB3.0/DP Combo PHY0
&usbdp_phy0 {
status = "disabled";
};
&usbdp_phy0_dp {
status = "disabled";
};
&usbdp_phy0_u3 {
status = "disabled";
};
# USB3.0/DP Combo PHY1
&usbdp_phy1 {
status = "disabled";
};
&usbdp_phy1_dp {
status = "disabled";
};
&usbdp_phy1_u3 {
status = "disabled";
};
1.6.2.2 禁用phy-rockchip-usbdp
驱动
USB3.0/DP Combo PHY
使用的是Innosilicon IP
,应选择Rockchip USBDP COMBO PHY Driver
,驱动位于drivers/phy/rockchip/phy-rockchip-usbdp.c
;
root@ubuntu:/work/sambashare/rk3588/rockchip# grep "rockchip-usbdp-phy" kernel/drivers/phy -nR
kernel/drivers/phy/rockchip/phy-rockchip-usbdp.c:1664: .name = "rockchip-usbdp-phy",
obj-$(CONFIG_PHY_ROCKCHIP_USBDP) += phy-rockchip-usbdp.o
进入内核目录make menuconfig
是看不到这个驱动配置,但是kernel/arch/arm64/configs/rockchip_linux_defconfig
默认配置了:
CONFIG_PHY_ROCKCHIP_USBDP=y
修改kernel/arch/arm64/configs/rockchip_linux_defconfig
:
CONFIG_PHY_ROCKCHIP_USBDP=n
1.6.3 下载测试
编译内核:
root@ubuntu:/work/sambashare/rk3588/rockchip# ./build.sh kernel
下载内核:
root@ubuntu:/work/sambashare/rk3588/rockchip# ./rkflash.sh tb
测试结果:
点击查看代码
DDR V1.13 25cee80c4f cym 23/08/11-09:31:58
LPDDR4, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=15 CS=1 Die BW=16 Size=512MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=15 CS=1 Die BW=16 Size=512MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=15 CS=1 Die BW=16 Size=512MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=15 CS=1 Die BW=16 Size=512MB
Manufacturer ID:0x1
CH0 RX Vref:41.2%, TX Vref:13.2%,0.0%
CH1 RX Vref:36.9%, TX Vref:13.2%,0.0%
CH2 RX Vref:41.2%, TX Vref:13.2%,0.0%
CH3 RX Vref:43.2%, TX Vref:13.2%,0.0%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
U-Boot SPL board init
U-Boot SPL 2017.09-g5f53abfa1e-221223 #zzz (Dec 26 2022 - 09:10:09)
unknown raw ID 0 0 0
unrecognized JEDEC id bytes: 00, 00, 00
Trying to boot from MMC2
MMC: no card present
mmc_init: -123, time 0
spl: mmc init failed with error: -123
Trying to boot from MMC1
SPL: A/B-slot: _a, successful: 0, tries-remain: 7
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(c902200be1...) + OK
## Checking uboot 0x00200000 ... sha256(f41f386553...) + OK
## Checking fdt 0x002f81a8 ... sha256(8ecccd16d2...) + OK
## Checking atf-2 0x000f0000 ... sha256(aa71013e72...) + OK
## Checking atf-3 0xff100000 ... sha256(225d6bf071...) + OK
## Checking optee 0x08400000 ... sha256(66e30bf9e8...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000)
Total: 113.8 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-639-g87bcc5dfe:derrick.huang
NOTICE: BL31: Built : 18:06:16, Sep 9 2023
INFO: spec: 0xa
INFO: ext 32k is not valid
INFO: ddr: stride-en 4CH
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO: l3 cache partition cfg-0
INFO: system boots from cpu-hwid-0
INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
I/TC:
I/TC: OP-TEE version: 3.13.0-743-gb5340fd65 #hisping.lin (gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))) #6 Mon Aug 28 18:01:38 CST 2023 aarch64
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2017.09-230909-dirty #zhengyang (Nov 24 2024 - 00:44:41 +0800)
Model: Rockchip RK3588 Evaluation Board
MPIDR: 0x81000000
PreSerial: 2, raw, 0xfeb50000
DRAM: 2 GiB
Sysmem: init
Relocation Offset: 7fbb7000
Relocation fdt: 7d9f9e80 - 7d9fecd8
CR: M/C/I
Using default environment
optee api revision: 2.0
mmc@fe2c0000: 1, mmc@fe2e0000: 0
Bootdev(atags): mmc 0
MMC0: HS400 Enhanced Strobe, 200Mhz
PartType: EFI
TEEC: Waring: Could not find security partition
DM: v2
boot mode: None
RESC: 'boot', blk@0x00019028
resource: sha256+
FIT: no signed, no conf required
DTB: rk-kernel.dtb
HASH(c): OK
I2c0 speed: 100000Hz
vsel-gpios- not found!
en-gpios- not found!
read reg[0x03] failed, ret=-121
Failed to get chip ID!
Model: Rockchip RK3588 EVB7 V11 Board
MPIDR: 0x81000000
spi2: RK806: 2
ON=0x40, OFF=0x00
CLK: (sync kernel. arm: enter 1008000 KHz, init 1008000 KHz, kernel 0N/A)
b0pll 24000 KHz
b1pll 24000 KHz
lpll 24000 KHz
v0pll 24000 KHz
aupll 786431 KHz
cpll 1500000 KHz
gpll 1188000 KHz
npll 850000 KHz
ppll 1100000 KHz
aclk_center_root 702000 KHz
pclk_center_root 100000 KHz
hclk_center_root 396000 KHz
aclk_center_low_root 500000 KHz
aclk_top_root 750000 KHz
pclk_top_root 100000 KHz
aclk_low_top_root 396000 KHz
Net: eth1: ethernet@fe1c0000
Hit key to stop autoboot('CTRL+C'): 0
ANDROID: reboot reason: "(none)"
Not AVB images, AVB skip
No valid android hdr
Android image load failed
Android boot failed, error -1.
## Booting FIT Image at 0x7b5f3e40 with size 0x02205000
Fdt Ramdisk skip relocation
## Loading kernel from FIT Image at 7b5f3e40 ...
Using 'conf' configuration
## Verified-boot: 0
Trying 'kernel' kernel subimage
Description: unavailable
Type: Kernel Image
Compression: uncompressed
Data Start: 0x7b639c40
Data Size: 35385856 Bytes = 33.7 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x00400000
Entry Point: 0x00400000
Hash algo: sha256
Hash value: d99a2cabf9aa8bf566fc5165988ec9061ed55a26482d14ef890b387ffaae009b
Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 7b5f3e40 ...
Using 'conf' configuration
Trying 'fdt' fdt subimage
Description: unavailable
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x7b5f4640
Data Size: 283991 Bytes = 277.3 KiB
Architecture: AArch64
Load Address: 0x08300000
Hash algo: sha256
Hash value: 797665f40ae374c206648afe52e35338b57670eb1b2a55a6c154d59fc0578e92
Verifying Hash Integrity ... sha256+ OK
Loading fdt from 0x08300000 to 0x08300000
Booting using the fdt blob at 0x08300000
Loading Kernel Image from 0x7b639c40 to 0x00400000 ... OK
kernel loaded at 0x00400000, end = 0x025bf200
Using Device Tree in place at 0000000008300000, end 0000000008348556
WARNING: could not set reg FDT_ERR_BADOFFSET.
## reserved-memory:
cma: addr=10000000 size=8000000
ramoops@110000: addr=110000 size=f0000
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x09400000 - 0x80000000 (size: 0x76c00000)
Total: 504.799/878.744 ms
Starting kernel ...
[ 0.883858] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[ 0.883876] Linux version 5.10.160 (zhengyang@ubuntu) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #13 SMP Sun Nov 24 17:47:00 CST 2024
[ 0.895334] Machine model: Rockchip RK3588 EVB7 V11 Board
[ 0.895403] earlycon: uart8250 at MMIO32 0x00000000feb50000 (options '')
[ 0.899526] printk: bootconsole [uart8250] enabled
[ 0.902434] efi: UEFI not found.
[ 0.908706] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-logo@00000000': base 0x0000000000000000, size 0 MiB
[ 0.909774] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-cubic-lut@00000000': base 0x0000000000000000, size 0 MiB
[ 0.910928] Reserved memory: created CMA memory pool at 0x0000000010000000, size 128 MiB
[ 0.911669] OF: reserved mem: initialized node cma, compatible id shared-dma-pool
[ 0.959567] Zone ranges:
[ 0.959807] DMA [mem 0x0000000000200000-0x000000007fffffff]
[ 0.960377] DMA32 empty
[ 0.960643] Normal empty
[ 0.960909] Movable zone start for each node
[ 0.961301] Early memory node ranges
[ 0.961630] node 0: [mem 0x0000000000200000-0x00000000083fffff]
[ 0.962205] node 0: [mem 0x0000000009400000-0x000000007fffffff]
[ 0.962782] Initmem setup node 0 [mem 0x0000000000200000-0x000000007fffffff]
[ 0.963429] On node 0 totalpages: 519680
[ 0.963789] DMA zone: 8184 pages used for memmap
[ 0.964228] DMA zone: 0 pages reserved
[ 0.964589] DMA zone: 519680 pages, LIFO batch:63
[ 0.977673] psci: probing for conduit method from DT.
[ 0.978144] psci: PSCIv1.1 detected in firmware.
[ 0.978567] psci: Using standard PSCI v0.2 function IDs
[ 0.979048] psci: Trusted OS migration not required
[ 0.979498] psci: SMC Calling Convention v1.2
[ 0.980252] percpu: Embedded 30 pages/cpu s83480 r8192 d31208 u122880
[ 0.980885] pcpu-alloc: s83480 r8192 d31208 u122880 alloc=30*4096
[ 0.981445] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7
[ 0.982189] Detected VIPT I-cache on CPU0
[ 0.982590] CPU features: detected: GIC system register CPU interface
[ 0.983181] CPU features: detected: Virtualization Host Extensions
[ 0.983751] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[ 0.984394] alternatives: patching kernel code
[ 0.986447] Built 1 zonelists, mobility grouping on. Total pages: 511496
[ 0.987073] Kernel command line: storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal androidboot.verifiedbootstate=orange rw rootwait earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 root=PARTUUID=614e0000-0000
[ 0.989567] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.990395] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.991105] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 1.007895] Memory: 1870076K/2078720K available (18304K kernel code, 3388K rwdata, 6104K rodata, 6656K init, 571K bss, 77572K reserved, 131072K cma-reserved)
[ 1.009293] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[ 1.009914] ftrace: allocating 56746 entries in 222 pages
[ 1.083905] ftrace: allocated 222 pages with 6 groups
[ 1.084593] rcu: Hierarchical RCU implementation.
[ 1.085029] rcu: RCU event tracing is enabled.
[ 1.085446] Rude variant of Tasks RCU enabled.
[ 1.085863] rcu: RCU calculated value of scheduler-enlistment delay is 30 jiffies.
[ 1.090602] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 1.093901] GICv3: GIC: Using split EOI/Deactivate mode
[ 1.094383] GICv3: 480 SPIs implemented
[ 1.094736] GICv3: 0 Extended SPIs implemented
[ 1.095164] GICv3: Distributor has no Range Selector support
[ 1.095687] GICv3: 16 PPIs implemented
[ 1.096073] GICv3: CPU0: found redistributor 0 region 0:0x00000000fe680000
[ 1.096794] ITS [mem 0xfe640000-0xfe65ffff]
[ 1.097224] ITS@0x00000000fe640000: allocated 8192 Devices @3e0000 (indirect, esz 8, psz 64K, shr 0)
[ 1.098081] ITS@0x00000000fe640000: allocated 32768 Interrupt Collections @3f0000 (flat, esz 2, psz 64K, shr 0)
[ 1.099007] ITS: using cache flushing for cmd queue
[ 1.099478] ITS [mem 0xfe660000-0xfe67ffff]
[ 1.099905] ITS@0x00000000fe660000: allocated 8192 Devices @2c10000 (indirect, esz 8, psz 64K, shr 0)
[ 1.100769] ITS@0x00000000fe660000: allocated 32768 Interrupt Collections @2c20000 (flat, esz 2, psz 64K, shr 0)
[ 1.101703] ITS: using cache flushing for cmd queue
[ 1.102386] GICv3: using LPI property table @0x0000000002c30000
[ 1.103045] GIC: using cache flushing for LPI property table
[ 1.103569] GICv3: CPU0: using allocated LPI pending table @0x0000000002c40000
[ 1.229532] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 1.230089] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 1.231065] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 1.233099] Console: colour dummy device 80x25
[ 1.233522] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=80000)
[ 1.234454] pid_max: default: 32768 minimum: 301
[ 1.234975] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 1.235647] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 1.237574] rcu: Hierarchical SRCU implementation.
[ 1.238717] Platform MSI: msi-controller@fe640000 domain created
[ 1.239273] Platform MSI: msi-controller@fe660000 domain created
[ 1.240200] PCI/MSI: /interrupt-controller@fe600000/msi-controller@fe640000 domain created
[ 1.240957] PCI/MSI: /interrupt-controller@fe600000/msi-controller@fe660000 domain created
[ 1.241903] EFI services will not be available.
[ 1.242598] smp: Bringing up secondary CPUs ...
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot
I/TC: Secondary CPU 4 initializing
I/TC: Secondary CPU 4 switching to normal world boot
I/TC: Secondary CPU 5 initializing
I/TC: Secondary CPU 5 switching to normal world boot
I/TC: Secondary CPU 6 initializing
I/TC: Secondary CPU 6 switching to normal world boot
I/TC: Secondary CPU 7 initializing
I/TC: Secondary CPU 7 switching to normal world boot
[ 1.244134] Detected VIPT I-cache on CPU1
[ 1.244160] GICv3: CPU1: found redistributor 100 region 0:0x00000000fe6a0000
[ 1.244175] GICv3: CPU1: using allocated LPI pending table @0x0000000002c50000
[ 1.244212] CPU1: Booted secondary processor 0x0000000100 [0x412fd050]
[ 1.245373] Detected VIPT I-cache on CPU2
[ 1.245393] GICv3: CPU2: found redistributor 200 region 0:0x00000000fe6c0000
[ 1.245408] GICv3: CPU2: using allocated LPI pending table @0x0000000002c60000
[ 1.245444] CPU2: Booted secondary processor 0x0000000200 [0x412fd050]
[ 1.246576] Detected VIPT I-cache on CPU3
[ 1.246595] GICv3: CPU3: found redistributor 300 region 0:0x00000000fe6e0000
[ 1.246609] GICv3: CPU3: using allocated LPI pending table @0x0000000002c70000
[ 1.246642] CPU3: Booted secondary processor 0x0000000300 [0x412fd050]
[ 1.247773] CPU features: detected: Spectre-v4
[ 1.247775] CPU features: detected: Spectre-BHB
[ 1.247777] Detected PIPT I-cache on CPU4
[ 1.247787] GICv3: CPU4: found redistributor 400 region 0:0x00000000fe700000
[ 1.247796] GICv3: CPU4: using allocated LPI pending table @0x0000000002c80000
[ 1.247817] CPU4: Booted secondary processor 0x0000000400 [0x414fd0b0]
[ 1.248918] Detected PIPT I-cache on CPU5
[ 1.248929] GICv3: CPU5: found redistributor 500 region 0:0x00000000fe720000
[ 1.248938] GICv3: CPU5: using allocated LPI pending table @0x0000000002c90000
[ 1.248960] CPU5: Booted secondary processor 0x0000000500 [0x414fd0b0]
[ 1.250067] Detected PIPT I-cache on CPU6
[ 1.250079] GICv3: CPU6: found redistributor 600 region 0:0x00000000fe740000
[ 1.250087] GICv3: CPU6: using allocated LPI pending table @0x0000000002ca0000
[ 1.250109] CPU6: Booted secondary processor 0x0000000600 [0x414fd0b0]
[ 1.251198] Detected PIPT I-cache on CPU7
[ 1.251210] GICv3: CPU7: found redistributor 700 region 0:0x00000000fe760000
[ 1.251217] GICv3: CPU7: using allocated LPI pending table @0x0000000002cb0000
[ 1.251239] CPU7: Booted secondary processor 0x0000000700 [0x414fd0b0]
[ 1.251290] smp: Brought up 1 node, 8 CPUs
[ 1.268104] SMP: Total of 8 processors activated.
[ 1.268536] CPU features: detected: Privileged Access Never
[ 1.269040] CPU features: detected: User Access Override
[ 1.269520] CPU features: detected: 32-bit EL0 Support
[ 1.269985] CPU features: detected: Common not Private translations
[ 1.270551] CPU features: detected: RAS Extension Support
[ 1.271039] CPU features: detected: Data cache clean to the PoU not required for I/D coherence
[ 1.271815] CPU features: detected: CRC32 instructions
[ 1.272283] CPU features: detected: Speculative Store Bypassing Safe (SSBS)
[ 1.272913] CPU features: detected: RCpc load-acquire (LDAPR)
[ 1.273498] CPU: All CPU(s) started at EL2
[ 1.274838] devtmpfs: initialized
[ 1.285908] Registered cp15_barrier emulation handler
[ 1.286371] Registered setend emulation handler
[ 1.286837] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[ 1.287714] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[ 1.289261] pinctrl core: initialized pinctrl subsystem
[ 1.289908] DMI not present or invalid.
[ 1.290424] NET: Registered protocol family 16
[ 1.291653] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 1.292339] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 1.293463] Registered FIQ tty driver
[ 1.293883] thermal_sys: Registered thermal governor 'fair_share'
[ 1.293884] thermal_sys: Registered thermal governor 'step_wise'
[ 1.294434] thermal_sys: Registered thermal governor 'user_space'
[ 1.294981] thermal_sys: Registered thermal governor 'power_allocator'
[ 1.295641] thermal thermal_zone1: power_allocator: sustainable_power will be estimated
[ 1.296969] thermal thermal_zone2: power_allocator: sustainable_power will be estimated
[ 1.297711] thermal thermal_zone3: power_allocator: sustainable_power will be estimated
[ 1.298451] thermal thermal_zone4: power_allocator: sustainable_power will be estimated
[ 1.299190] thermal thermal_zone5: power_allocator: sustainable_power will be estimated
[ 1.299928] thermal thermal_zone6: power_allocator: sustainable_power will be estimated
[ 1.300661] cpuidle: using governor menu
[ 1.301092] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 1.301787] ASID allocator initialised with 65536 entries
[ 1.303526] ramoops: dmesg-0 0x20000@0x0000000000110000
[ 1.304006] ramoops: console 0x80000@0x0000000000130000
[ 1.304485] ramoops: pmsg 0x50000@0x00000000001b0000
[ 1.305155] printk: console [ramoops-1] enabled
[ 1.305565] pstore: Registered ramoops as persistent store backend
[ 1.306123] ramoops: using 0xf0000@0x110000, ecc: 0
[ 1.341802] rockchip-gpio fd8a0000.gpio: probed /pinctrl/gpio@fd8a0000
[ 1.342558] rockchip-gpio fec20000.gpio: probed /pinctrl/gpio@fec20000
[ 1.343285] rockchip-gpio fec30000.gpio: probed /pinctrl/gpio@fec30000
[ 1.344042] rockchip-gpio fec40000.gpio: probed /pinctrl/gpio@fec40000
[ 1.344786] rockchip-gpio fec50000.gpio: probed /pinctrl/gpio@fec50000
[ 1.345407] rockchip-pinctrl pinctrl: probed pinctrl
[ 1.357667] fiq_debugger fiq_debugger.0: IRQ fiq not found
[ 1.358168] fiq_debugger fiq_debugger.0: IRQ wakeup not found
[ 1.358685] fiq_debugger_probe: could not install nmi irq handler
[[ 1.359277] printk: console [ttyFIQ0] enabled
1.359277] printk: console [ttyFIQ0] enabled
[ 1.360047] printk: bootconsole [uart8250] disabled
[ 1.360047] printk: bootconsole [uart8250] disabled
[ 1.360550] Registered fiq debugger ttyFIQ0
[ 1.360801] vcc5v0_sys: supplied by vcc12v_dcin
[ 1.360876] vcc5v0_usbdcin: supplied by vcc12v_dcin
[ 1.360950] vcc5v0_usb: supplied by vcc5v0_usbdcin
[ 1.361026] vcc_1v1_nldo_s3: supplied by vcc5v0_sys
[ 1.361174] vbus5v0_typec: supplied by vcc5v0_usb
[ 1.361254] vcc3v3_pcie30: supplied by vcc12v_dcin
[ 1.361333] vcc5v0_host: supplied by vcc5v0_usb
[ 1.361922] iommu: Default domain type: Translated
[ 1.364376] SCSI subsystem initialized
[ 1.364389] libata version 3.00 loaded.
[ 1.364436] usbcore: registered new interface driver usbfs
[ 1.364448] usbcore: registered new interface driver hub
[ 1.364460] usbcore: registered new device driver usb
[ 1.364485] mc: Linux media interface: v0.10
[ 1.364493] videodev: Linux video capture interface: v2.00
[ 1.364512] pps_core: LinuxPPS API ver. 1 registered
[ 1.364515] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 1.364521] PTP clock support registered
[ 1.364534] EDAC MC: Ver: 3.0.0
[ 1.364792] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled.
[ 1.364820] arm-scmi firmware:scmi: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0
[ 1.365743] Advanced Linux Sound Architecture Driver Initialized.
[ 1.365878] Bluetooth: Core ver 2.22
[ 1.365887] NET: Registered protocol family 31
[ 1.365890] Bluetooth: HCI device and connection manager initialized
[ 1.365895] Bluetooth: HCI socket layer initialized
[ 1.365899] Bluetooth: L2CAP socket layer initialized
[ 1.365904] Bluetooth: SCO socket layer initialized
[ 1.367184] rockchip-cpuinfo cpuinfo: SoC : 35881000
[ 1.367188] rockchip-cpuinfo cpuinfo: Serial : 3d2e1e1e546b03c7
[ 1.367401] clocksource: Switched to clocksource arch_sys_counter
[ 1.622699] NET: Registered protocol family 2
[ 1.622763] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 1.623387] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 1.623409] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 1.623496] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 1.623664] TCP: Hash tables configured (established 16384 bind 16384)
[ 1.623697] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 1.623731] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 1.623807] NET: Registered protocol family 1
[ 1.624003] RPC: Registered named UNIX socket transport module.
[ 1.624008] RPC: Registered udp transport module.
[ 1.624011] RPC: Registered tcp transport module.
[ 1.624014] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.624289] PCI: CLS 0 bytes, default 64
[ 1.624885] rockchip-thermal fec00000.tsadc: Missing rockchip,grf property
[ 1.625273] rockchip-thermal fec00000.tsadc: tsadc is probed successfully!
[ 1.625852] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[ 1.627523] Initialise system trusted keyrings
[ 1.627572] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[ 1.628933] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.629101] NFS: Registering the id_resolver key type
[ 1.629110] Key type id_resolver registered
[ 1.629113] Key type id_legacy registered
[ 1.629126] ntfs: driver 2.1.32 [Flags: R/O].
[ 1.629184] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 1.629273] fuse: init (API version 7.32)
[ 1.629362] SGI XFS with security attributes, no debug enabled
[ 1.650007] NET: Registered protocol family 38
[ 1.650013] Key type asymmetric registered
[ 1.650017] Asymmetric key parser 'x509' registered
[ 1.650027] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 242)
[ 1.650031] io scheduler mq-deadline registered
[ 1.650033] io scheduler kyber registered
[ 1.650384] rockchip-csi2-dphy-hw fedc0000.csi2-dphy0-hw: csi2 dphy hw probe successfully!
[ 1.650447] rockchip-csi2-dphy-hw fedc8000.csi2-dphy1-hw: csi2 dphy hw probe successfully!
[ 1.657080] rockchip-hdptx-phy-hdmi fed60000.hdmiphy: hdptx phy init success
[ 1.657692] rockchip-hdptx-phy-hdmi fed70000.hdmiphy: hdptx phy init success
[ 1.659004] pwm-backlight backlight: supply power not found, using dummy regulator
[ 1.659201] iep: Module initialized.
[ 1.659225] mpp_service mpp-srv: f421f8a9774d author: Yandong Lin 2023-09-21 video: rockchip: mpp: rkvenc2: fix slice mode poll failed
[ 1.659229] mpp_service mpp-srv: probe start
[ 1.660027] mpp_vdpu1 fdb51000.avsd-plus: Adding to iommu group 1
[ 1.660184] mpp_vdpu1 fdb51000.avsd-plus: probe device
[ 1.660264] mpp_vdpu1 fdb51000.avsd-plus: reset_group->rw_sem_on=0
[ 1.660271] mpp_vdpu1 fdb51000.avsd-plus: reset_group->rw_sem_on=0
[ 1.660347] mpp_vdpu1 fdb51000.avsd-plus: probing finish
[ 1.660605] mpp_vdpu2 fdb50400.vdpu: Adding to iommu group 1
[ 1.660635] mpp_vdpu2 fdb50400.vdpu: probe device
[ 1.660696] mpp_vdpu2 fdb50400.vdpu: reset_group->rw_sem_on=0
[ 1.660700] mpp_vdpu2 fdb50400.vdpu: reset_group->rw_sem_on=0
[ 1.660772] mpp_vdpu2 fdb50400.vdpu: probing finish
[ 1.660896] mpp_vepu2 jpege-ccu: probing start
[ 1.660900] mpp_vepu2 jpege-ccu: probing finish
[ 1.660981] mpp_vepu2 fdb50000.vepu: Adding to iommu group 1
[ 1.661008] mpp_vepu2 fdb50000.vepu: probing start
[ 1.661068] mpp_vepu2 fdb50000.vepu: reset_group->rw_sem_on=0
[ 1.661072] mpp_vepu2 fdb50000.vepu: reset_group->rw_sem_on=0
[ 1.661140] mpp_vepu2 fdb50000.vepu: probing finish
[ 1.661198] mpp_vepu2 fdba0000.jpege-core: Adding to iommu group 5
[ 1.661264] mpp_vepu2 fdba0000.jpege-core: probing start
[ 1.661346] mpp_vepu2 fdba0000.jpege-core: attach ccu success
[ 1.661404] mpp_vepu2 fdba0000.jpege-core: probing finish
[ 1.661444] mpp_vepu2 fdba4000.jpege-core: Adding to iommu group 6
[ 1.661510] mpp_vepu2 fdba4000.jpege-core: probing start
[ 1.661578] mpp_vepu2 fdba4000.jpege-core: attach ccu success
[ 1.661634] mpp_vepu2 fdba4000.jpege-core: probing finish
[ 1.661682] mpp_vepu2 fdba8000.jpege-core: Adding to iommu group 7
[ 1.661743] mpp_vepu2 fdba8000.jpege-core: probing start
[ 1.661809] mpp_vepu2 fdba8000.jpege-core: attach ccu success
[ 1.661865] mpp_vepu2 fdba8000.jpege-core: probing finish
[ 1.661914] mpp_vepu2 fdbac000.jpege-core: Adding to iommu group 8
[ 1.661976] mpp_vepu2 fdbac000.jpege-core: probing start
[ 1.662043] mpp_vepu2 fdbac000.jpege-core: attach ccu success
[ 1.662099] mpp_vepu2 fdbac000.jpege-core: probing finish
[ 1.662293] mpp-iep2 fdbb0000.iep: Adding to iommu group 9
[ 1.662358] mpp-iep2 fdbb0000.iep: probe device
[ 1.662442] mpp-iep2 fdbb0000.iep: allocate roi buffer failed
[ 1.662498] mpp-iep2 fdbb0000.iep: probing finish
[ 1.662638] mpp_jpgdec fdb90000.jpegd: Adding to iommu group 4
[ 1.662754] mpp_jpgdec fdb90000.jpegd: probe device
[ 1.662885] mpp_jpgdec fdb90000.jpegd: probing finish
[ 1.663161] mpp_rkvdec2 fdc30000.rkvdec-ccu: rkvdec-ccu, probing start
[ 1.663202] mpp_rkvdec2 fdc30000.rkvdec-ccu: ccu-mode: 1
[ 1.663206] mpp_rkvdec2 fdc30000.rkvdec-ccu: probing finish
[ 1.663275] mpp_rkvdec2 fdc38100.rkvdec-core: Adding to iommu group 12
[ 1.663452] mpp_rkvdec2 fdc38100.rkvdec-core: rkvdec-core, probing start
[ 1.663533] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_a is not found!
[ 1.663537] rkvdec2_init:1022: No niu aclk reset resource define
[ 1.663541] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_h is not found!
[ 1.663544] rkvdec2_init:1025: No niu hclk reset resource define
[ 1.663558] mpp_rkvdec2 fdc38100.rkvdec-core: no regulator, devfreq is disabled
[ 1.663604] mpp_rkvdec2 fdc38100.rkvdec-core: core_mask=00010001
[ 1.663607] mpp_rkvdec2 fdc38100.rkvdec-core: attach ccu as core 0
[ 1.663744] mpp_rkvdec2 fdc38100.rkvdec-core: sram_start 0x00000000ff001000
[ 1.663747] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_iova 0x00000000fff00000
[ 1.663750] mpp_rkvdec2 fdc38100.rkvdec-core: sram_size 491520
[ 1.663753] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_size 1048576
[ 1.663757] mpp_rkvdec2 fdc38100.rkvdec-core: min_width 512
[ 1.663761] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_info_count 20
[ 1.663765] mpp_rkvdec2 fdc38100.rkvdec-core: [136, 24576]
[ 1.663768] mpp_rkvdec2 fdc38100.rkvdec-core: [137, 49152]
[ 1.663771] mpp_rkvdec2 fdc38100.rkvdec-core: [141, 90112]
[ 1.663774] mpp_rkvdec2 fdc38100.rkvdec-core: [140, 49152]
[ 1.663777] mpp_rkvdec2 fdc38100.rkvdec-core: [139, 180224]
[ 1.663780] mpp_rkvdec2 fdc38100.rkvdec-core: [133, 49152]
[ 1.663783] mpp_rkvdec2 fdc38100.rkvdec-core: [134, 8192]
[ 1.663787] mpp_rkvdec2 fdc38100.rkvdec-core: [135, 4352]
[ 1.663790] mpp_rkvdec2 fdc38100.rkvdec-core: [138, 13056]
[ 1.663793] mpp_rkvdec2 fdc38100.rkvdec-core: [142, 291584]
[ 1.663814] mpp_rkvdec2 fdc38100.rkvdec-core: probing finish
[ 1.663873] mpp_rkvdec2 fdc48100.rkvdec-core: Adding to iommu group 13
[ 1.664037] mpp_rkvdec2 fdc48100.rkvdec-core: rkvdec-core, probing start
[ 1.664125] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_a is not found!
[ 1.664128] rkvdec2_init:1022: No niu aclk reset resource define
[ 1.664132] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_h is not found!
[ 1.664135] rkvdec2_init:1025: No niu hclk reset resource define
[ 1.664148] mpp_rkvdec2 fdc48100.rkvdec-core: no regulator, devfreq is disabled
[ 1.664181] mpp_rkvdec2 fdc48100.rkvdec-core: core_mask=00020002
[ 1.664196] mpp_rkvdec2 fdc48100.rkvdec-core: attach ccu as core 1
[ 1.664352] mpp_rkvdec2 fdc48100.rkvdec-core: sram_start 0x00000000ff079000
[ 1.664355] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_iova 0x00000000ffe00000
[ 1.664358] mpp_rkvdec2 fdc48100.rkvdec-core: sram_size 487424
[ 1.664361] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_size 1048576
[ 1.664365] mpp_rkvdec2 fdc48100.rkvdec-core: min_width 512
[ 1.664369] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_info_count 20
[ 1.664373] mpp_rkvdec2 fdc48100.rkvdec-core: [136, 24576]
[ 1.664376] mpp_rkvdec2 fdc48100.rkvdec-core: [137, 49152]
[ 1.664379] mpp_rkvdec2 fdc48100.rkvdec-core: [141, 90112]
[ 1.664382] mpp_rkvdec2 fdc48100.rkvdec-core: [140, 49152]
[ 1.664385] mpp_rkvdec2 fdc48100.rkvdec-core: [139, 180224]
[ 1.664388] mpp_rkvdec2 fdc48100.rkvdec-core: [133, 49152]
[ 1.664391] mpp_rkvdec2 fdc48100.rkvdec-core: [134, 8192]
[ 1.664394] mpp_rkvdec2 fdc48100.rkvdec-core: [135, 4352]
[ 1.664397] mpp_rkvdec2 fdc48100.rkvdec-core: [138, 13056]
[ 1.664400] mpp_rkvdec2 fdc48100.rkvdec-core: [142, 291584]
[ 1.664420] mpp_rkvdec2 fdc48100.rkvdec-core: probing finish
[ 1.664602] mpp_rkvenc2 rkvenc-ccu: probing start
[ 1.664606] mpp_rkvenc2 rkvenc-ccu: probing finish
[ 1.665034] mpp_av1dec: Adding child /av1d@fdc70000
[ 1.665202] mpp_av1dec: register device av1d-master
[ 1.665214] mpp_av1dec av1d-master: av1_iommu_of_xlate,784
[ 1.665228] av1_iommu_probe_device,736, consumer : av1d-master, supplier : fdca0000.iommu
[ 1.665234] mpp_av1dec av1d-master: Adding to iommu group 17
[ 1.665390] mpp_av1dec av1d-master: probing start
[ 1.665537] mpp_av1dec av1d-master: probing finish
[ 1.665561] mpp_service mpp-srv: probe success
[ 1.673435] dma-pl330 fea10000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 1.673442] dma-pl330 fea10000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[ 1.674033] dma-pl330 fea30000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 1.674039] dma-pl330 fea30000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[ 1.674658] dma-pl330 fed10000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 1.674663] dma-pl330 fed10000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[ 1.675174] rockchip-pvtm fda40000.pvtm: pvtm@0 probed
[ 1.675214] rockchip-pvtm fda50000.pvtm: pvtm@1 probed
[ 1.675249] rockchip-pvtm fda60000.pvtm: pvtm@2 probed
[ 1.675283] rockchip-pvtm fdaf0000.pvtm: pvtm@3 probed
[ 1.675317] rockchip-pvtm fdb30000.pvtm: pvtm@4 probed
[ 1.675767] rockchip-system-monitor rockchip-system-monitor: system monitor probe
[ 1.676365] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 1.676744] febc0000.serial: ttyS9 at MMIO 0xfebc0000 (irq = 105, base_baud = 1500000) is a 16550A
[ 1.677710] random: crng init done
[ 1.678394] rockchip-vop2 fdd90000.vop: Adding to iommu group 16
[ 1.688516] panel-simple-dsi fde20000.dsi.0: failed to get power regulator: -517
[ 1.690482] brd: module loaded
[ 1.692560] loop: module loaded
[ 1.692685] zram: Added device: zram0
[ 1.692787] lkdtm: No crash points registered, enable through debugfs
[ 1.693689] ahci fe210000.sata: supply ahci not found, using dummy regulator
[ 1.693734] ahci fe210000.sata: supply phy not found, using dummy regulator
[ 1.693772] ahci fe210000.sata: supply target not found, using dummy regulator
[ 1.693828] ahci fe210000.sata: forcing port_map 0x0 -> 0x1
[ 1.693847] ahci fe210000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[ 1.693853] ahci fe210000.sata: flags: ncq sntf pm led clo only pmp fbs pio slum part ccc apst
[ 1.693861] ahci fe210000.sata: port 0 can do FBS, forcing FBSCP
[ 1.694491] scsi host0: ahci
[ 1.694590] ata1: SATA max UDMA/133 mmio [mem 0xfe210000-0xfe210fff] port 0x100 irq 90
[ 1.695451] rockchip-spi feb20000.spi: no high_speed pinctrl state
[ 1.696448] rk806 spi2.0: chip id: RK806,ver:0x2, 0x1
[ 1.696640] rk806 spi2.0: ON: 0x40 OFF:0x0
[ 1.698038] vdd_gpu_s0: supplied by vcc5v0_sys
[ 1.699134] vdd_cpu_lit_s0: supplied by vcc5v0_sys
[ 1.699727] vdd_log_s0: supplied by vcc5v0_sys
[ 1.700266] vdd_vdenc_s0: supplied by vcc5v0_sys
[ 1.700863] vdd_ddr_s0: supplied by vcc5v0_sys
[ 1.701184] vdd2_ddr_s3: supplied by vcc5v0_sys
[ 1.701704] vdd_2v0_pldo_s3: supplied by vcc5v0_sys
[ 1.702178] vcc_3v3_s3: supplied by vcc5v0_sys
[ 1.702604] vddq_ddr_s0: supplied by vcc5v0_sys
[ 1.703108] vcc_1v8_s3: supplied by vcc5v0_sys
[ 1.703632] vdd_0v75_s3: supplied by vcc_1v1_nldo_s3
[ 1.704141] vdd_ddr_pll_s0: supplied by vcc_1v1_nldo_s3
[ 1.704519] avdd_0v75_s0: Bringing 750000uV into 837500-837500uV
[ 1.704717] avdd_0v75_s0: supplied by vcc_1v1_nldo_s3
[ 1.705150] vdd_0v85_s0: supplied by vcc_1v1_nldo_s3
[ 1.705586] vdd_0v75_s0: supplied by vcc_1v1_nldo_s3
[ 1.706098] avcc_1v8_s0: supplied by vdd_2v0_pldo_s3
[ 1.706736] vcc_1v8_s0: supplied by vdd_2v0_pldo_s3
[ 1.707312] avdd_1v2_s0: supplied by vdd_2v0_pldo_s3
[ 1.707814] vcc_3v3_s0: supplied by vcc5v0_sys
[ 1.708250] vccio_sd_s0: supplied by vcc5v0_sys
[ 1.708707] pldo6_s3: supplied by vcc5v0_sys
[ 1.709127] rk806 spi2.0: no sleep-setting state
[ 1.709132] rk806 spi2.0: no reset-setting pinctrl state
[ 1.709135] rk806 spi2.0: no dvs-setting pinctrl state
[ 1.710383] rockchip-spi feb20000.spi: probed, poll=0, rsd=0, cs-inactive=0, ready=0
[ 1.711632] rk_gmac-dwmac fe1c0000.ethernet: IRQ eth_lpi not found
[ 1.711756] rk_gmac-dwmac fe1c0000.ethernet: no regulator found
[ 1.711761] rk_gmac-dwmac fe1c0000.ethernet: clock input or output? (output).
[ 1.711766] rk_gmac-dwmac fe1c0000.ethernet: TX delay(0x43).
[ 1.711770] rk_gmac-dwmac fe1c0000.ethernet: Can not read property: rx_delay.
[ 1.711774] rk_gmac-dwmac fe1c0000.ethernet: set rx_delay to 0xffffffff
[ 1.711787] rk_gmac-dwmac fe1c0000.ethernet: integrated PHY? (no).
[ 1.711792] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock mac_clk_rx
[ 1.711797] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock mac_clk_tx
[ 1.711807] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock clk_mac_speed
[ 1.712022] rk_gmac-dwmac fe1c0000.ethernet: init for RGMII_RXID
[ 1.712082] rk_gmac-dwmac fe1c0000.ethernet: User ID: 0x30, Synopsys ID: 0x51
[ 1.712087] rk_gmac-dwmac fe1c0000.ethernet: DWMAC4/5
[ 1.712092] rk_gmac-dwmac fe1c0000.ethernet: DMA HW capability register supported
[ 1.712096] rk_gmac-dwmac fe1c0000.ethernet: RX Checksum Offload Engine supported
[ 1.712100] rk_gmac-dwmac fe1c0000.ethernet: TX Checksum insertion supported
[ 1.712103] rk_gmac-dwmac fe1c0000.ethernet: Wake-Up On Lan supported
[ 1.712129] rk_gmac-dwmac fe1c0000.ethernet: TSO supported
[ 1.712133] rk_gmac-dwmac fe1c0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 1.712138] rk_gmac-dwmac fe1c0000.ethernet: Enabled Flow TC (entries=2)
[ 1.712142] rk_gmac-dwmac fe1c0000.ethernet: TSO feature enabled
[ 1.712146] rk_gmac-dwmac fe1c0000.ethernet: Using 32 bits DMA width
[ 1.844285] mdio_bus stmmac-1: MDIO device at address 1 is missing.
[ 1.845102] usbcore: registered new interface driver rtl8150
[ 1.845118] usbcore: registered new interface driver r8152
[ 1.847558] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.847568] ehci-pci: EHCI PCI platform driver
[ 1.847591] ehci-platform: EHCI generic platform driver
[ 1.847775] phy phy-fd5d8000.syscon:usb2-phy@8000.1: port power on
[ 1.849788] ehci-platform fc800000.usb: EHCI Host Controller
[ 1.849840] ehci-platform fc800000.usb: new USB bus registered, assigned bus number 1
[ 1.849889] ehci-platform fc800000.usb: irq 20, io mem 0xfc800000
[ 1.860741] ehci-platform fc800000.usb: USB 2.0 started, EHCI 1.00
[ 1.860803] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[ 1.860808] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.860812] usb usb1: Product: EHCI Host Controller
[ 1.860816] usb usb1: Manufacturer: Linux 5.10.160 ehci_hcd
[ 1.860820] usb usb1: SerialNumber: fc800000.usb
[ 1.860963] hub 1-0:1.0: USB hub found
[ 1.860974] hub 1-0:1.0: 1 port detected
[ 1.861229] phy phy-fd5dc000.syscon:usb2-phy@c000.2: port power on
[ 1.863244] ehci-platform fc880000.usb: EHCI Host Controller
[ 1.863297] ehci-platform fc880000.usb: new USB bus registered, assigned bus number 2
[ 1.863341] ehci-platform fc880000.usb: irq 22, io mem 0xfc880000
[ 1.874073] ehci-platform fc880000.usb: USB 2.0 started, EHCI 1.00
[ 1.874124] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[ 1.874129] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.874133] usb usb2: Product: EHCI Host Controller
[ 1.874137] usb usb2: Manufacturer: Linux 5.10.160 ehci_hcd
[ 1.874141] usb usb2: SerialNumber: fc880000.usb
[ 1.874266] hub 2-0:1.0: USB hub found
[ 1.874277] hub 2-0:1.0: 1 port detected
[ 1.874574] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.874582] ohci-platform: OHCI generic platform driver
[ 1.874697] ohci-platform fc840000.usb: Generic Platform OHCI controller
[ 1.874746] ohci-platform fc840000.usb: new USB bus registered, assigned bus number 3
[ 1.874782] ohci-platform fc840000.usb: irq 21, io mem 0xfc840000
[ 1.934793] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.10
[ 1.934800] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.934804] usb usb3: Product: Generic Platform OHCI controller
[ 1.934808] usb usb3: Manufacturer: Linux 5.10.160 ohci_hcd
[ 1.934812] usb usb3: SerialNumber: fc840000.usb
[ 1.934943] hub 3-0:1.0: USB hub found
[ 1.934954] hub 3-0:1.0: 1 port detected
[ 1.935135] ohci-platform fc8c0000.usb: Generic Platform OHCI controller
[ 1.935182] ohci-platform fc8c0000.usb: new USB bus registered, assigned bus number 4
[ 1.935214] ohci-platform fc8c0000.usb: irq 23, io mem 0xfc8c0000
[ 1.994788] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.10
[ 1.994795] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.994799] usb usb4: Product: Generic Platform OHCI controller
[ 1.994803] usb usb4: Manufacturer: Linux 5.10.160 ohci_hcd
[ 1.994806] usb usb4: SerialNumber: fc8c0000.usb
[ 1.994940] hub 4-0:1.0: USB hub found
[ 1.994951] hub 4-0:1.0: 1 port detected
[ 1.995352] usbcore: registered new interface driver cdc_acm
[ 1.995356] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.995422] usbcore: registered new interface driver uas
[ 1.995454] usbcore: registered new interface driver usb-storage
[ 1.995480] usbcore: registered new interface driver usbserial_generic
[ 1.995489] usbserial: USB Serial support registered for generic
[ 1.995503] usbcore: registered new interface driver cp210x
[ 1.995511] usbserial: USB Serial support registered for cp210x
[ 1.995530] usbcore: registered new interface driver ftdi_sio
[ 1.995538] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 1.995578] usbcore: registered new interface driver keyspan
[ 1.995586] usbserial: USB Serial support registered for Keyspan - (without firmware)
[ 1.995594] usbserial: USB Serial support registered for Keyspan 1 port adapter
[ 1.995600] usbserial: USB Serial support registered for Keyspan 2 port adapter
[ 1.995607] usbserial: USB Serial support registered for Keyspan 4 port adapter
[ 1.995620] usbcore: registered new interface driver option
[ 1.995627] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1.995685] usbcore: registered new interface driver oti6858
[ 1.995692] usbserial: USB Serial support registered for oti6858
[ 1.995705] usbcore: registered new interface driver pl2303
[ 1.995712] usbserial: USB Serial support registered for pl2303
[ 1.995727] usbcore: registered new interface driver qcserial
[ 1.995734] usbserial: USB Serial support registered for Qualcomm USB modem
[ 1.995751] usbcore: registered new interface driver sierra
[ 1.995758] usbserial: USB Serial support registered for Sierra USB modem
[ 1.996123] usbcore: registered new interface driver usbtouchscreen
[ 1.997077] input: rk805 pwrkey as /devices/platform/feb20000.spi/spi_master/spi2/spi2.0/rk805-pwrkey.1.auto/input/input0
[ 1.997249] i2c /dev entries driver
[ 1.997848] rk860-regulator 0-0042: Failed to get chip ID!
[ 1.998112] rk860-regulator 0-0043: Failed to get chip ID!
[ 2.001467] vdd_npu_s0: supplied by vcc5v0_sys
[ 2.007081] ata1: SATA link down (SStatus 0 SControl 300)
[ 2.007813] i2c i2c-4: 1 i2c clients have been registered at 0x68
[ 2.009053] husb311 6-004e: fail to read Vendor id(-6)
[ 2.009059] husb311 6-004e: check vid/pid fail(-6)
[ 2.009564] rtc-hym8563 6-0051: could not init device, -6
[ 2.010425] ircut cam_ircut: driver version: 00.01.00
[ 2.010488] ircut cam_ircut: failed get pulse-width,use dafult value 100
[ 2.010556] ircut cam_ircut: probe successful!
[ 2.011008] rkcifhw fdce0000.rkcif: Adding to iommu group 15
[ 2.011807] rkcifhw fdce0000.rkcif: No reserved memory region assign to CIF
[ 2.011872] rkcif rkcif-mipi-lvds2: Adding to iommu group 15
[ 2.011883] rkcif rkcif-mipi-lvds2: rkcif driver version: v00.02.00
[ 2.011927] rkcif rkcif-mipi-lvds2: attach to cif hw node
[ 2.011931] rkcif rkcif-mipi-lvds2: rkcif wait line 0
[ 2.011936] : terminal subdev does not exist
[ 2.011940] : terminal subdev does not exist
[ 2.011943] : terminal subdev does not exist
[ 2.011946] : terminal subdev does not exist
[ 2.011951] : get_remote_sensor: video pad[0] is null
[ 2.011955] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 2.011960] : rkcif_scale_set_fmt: req(80, 60) src out(0, 0)
[ 2.011963] : get_remote_sensor: video pad[0] is null
[ 2.011966] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 2.011970] : rkcif_scale_set_fmt: req(80, 60) src out(0, 0)
[ 2.011974] : get_remote_sensor: video pad[0] is null
[ 2.011977] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 2.011981] : rkcif_scale_set_fmt: req(80, 60) src out(0, 0)
[ 2.011984] : get_remote_sensor: video pad[0] is null
[ 2.011987] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 2.011990] : rkcif_scale_set_fmt: req(80, 60) src out(0, 0)
[ 2.012487] rkcif rkcif-mipi-lvds2: No memory-region-thunderboot specified
[ 2.013171] rockchip-mipi-csi2-hw fdd10000.mipi0-csi2-hw: enter mipi csi2 hw probe!
[ 2.013231] rockchip-mipi-csi2-hw fdd10000.mipi0-csi2-hw: probe success, v4l2_dev:mipi0-csi2-hw!
[ 2.013257] rockchip-mipi-csi2-hw fdd20000.mipi1-csi2-hw: enter mipi csi2 hw probe!
[ 2.013303] rockchip-mipi-csi2-hw fdd20000.mipi1-csi2-hw: probe success, v4l2_dev:mipi1-csi2-hw!
[ 2.013325] rockchip-mipi-csi2-hw fdd30000.mipi2-csi2-hw: enter mipi csi2 hw probe!
[ 2.013366] rockchip-mipi-csi2-hw fdd30000.mipi2-csi2-hw: probe success, v4l2_dev:mipi2-csi2-hw!
[ 2.013388] rockchip-mipi-csi2-hw fdd40000.mipi3-csi2-hw: enter mipi csi2 hw probe!
[ 2.013427] rockchip-mipi-csi2-hw fdd40000.mipi3-csi2-hw: probe success, v4l2_dev:mipi3-csi2-hw!
[ 2.013448] rockchip-mipi-csi2-hw fdd50000.mipi4-csi2-hw: enter mipi csi2 hw probe!
[ 2.013487] rockchip-mipi-csi2-hw fdd50000.mipi4-csi2-hw: probe success, v4l2_dev:mipi4-csi2-hw!
[ 2.013509] rockchip-mipi-csi2-hw fdd60000.mipi5-csi2-hw: enter mipi csi2 hw probe!
[ 2.013546] rockchip-mipi-csi2-hw fdd60000.mipi5-csi2-hw: probe success, v4l2_dev:mipi5-csi2-hw!
[ 2.013925] rockchip-mipi-csi2 mipi2-csi2: attach to csi2 hw node
[ 2.013945] rkcif rkcif-mipi-lvds2: Entity type for entity rockchip-mipi-csi2 was not initialized!
[ 2.013950] rockchip-mipi-csi2: Async registered subdev
[ 2.013955] rockchip-mipi-csi2: probe success, v4l2_dev:rkcif-mipi-lvds2!
[ 2.014689] rkisp_hw fdcb0000.rkisp: Adding to iommu group 14
[ 2.014803] rkisp_hw fdcb0000.rkisp: is_thunderboot: 0
[ 2.014808] rkisp_hw fdcb0000.rkisp: Missing rockchip,grf property
[ 2.014821] rkisp_hw fdcb0000.rkisp: max input:0x0@0fps
[ 2.014874] rkisp_hw fdcb0000.rkisp: no find phandle sram
[ 2.015084] rkisp rkisp0-vir0: rkisp driver version: v02.03.00
[ 2.015144] rkisp rkisp0-vir0: No memory-region-thunderboot specified
[ 2.015192] rkisp rkisp0-vir0: Entity type for entity rkisp-isp-subdev was not initialized!
[ 2.016341] rk_hdmirx fdee0000.hdmirx-controller: No reserved memory for HDMIRX, use default CMA
[ 2.016360] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_probe: cpu_aff:0x400, Bound_cpu:4, wdt_cfg_bound_cpu:5
[ 2.016842] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_audio_interrupts_setup: 0
[ 2.017404] rk_hdmirx fdee0000.hdmirx-controller: rk_hdmirx_hdcp_register success
[ 2.017418] rk_hdmirx fdee0000.hdmirx-controller: fdee0000.hdmirx-controller driver probe ok!
[ 2.017492] usbcore: registered new interface driver uvcvideo
[ 2.017496] USB Video Class driver (1.1.1)
[ 2.018150] Bluetooth: HCI UART driver ver 2.3
[ 2.018156] Bluetooth: HCI UART protocol H4 registered
[ 2.018160] Bluetooth: HCI UART protocol ATH3K registered
[ 2.018178] usbcore: registered new interface driver bfusb
[ 2.018195] usbcore: registered new interface driver btusb
[ 2.018919] cpu cpu0: bin=2
[ 2.019090] cpu cpu0: leakage=13
[ 2.020490] cpu cpu0: pvtm=1424
[ 2.020603] cpu cpu0: pvtm-volt-sel=3
[ 2.021060] cpu cpu4: bin=2
[ 2.021228] cpu cpu4: leakage=10
[ 2.021249] cpu cpu4: Failed to get reg
[ 2.021267] cpu cpu4: soc version=2, speed=0
[ 2.021281] Failed to initialize dvfs info cpu4
[ 2.021865] sdhci: Secure Digital Host Controller Interface driver
[ 2.021869] sdhci: Copyright(c) Pierre Ossman
[ 2.021872] Synopsys Designware Multimedia Card Interface Driver
[ 2.022337] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.022738] dwmmc_rockchip fe2d0000.mmc: No normal pinctrl state
[ 2.022740] dwmmc_rockchip fe2c0000.mmc: No normal pinctrl state
[ 2.022746] dwmmc_rockchip fe2c0000.mmc: No idle pinctrl state
[ 2.022754] dwmmc_rockchip fe2d0000.mmc: No idle pinctrl state
[ 2.022865] dwmmc_rockchip fe2d0000.mmc: IDMAC supports 32-bit address mode.
[ 2.022867] dwmmc_rockchip fe2c0000.mmc: IDMAC supports 32-bit address mode.
[ 2.022874] dwmmc_rockchip fe2c0000.mmc: Using internal DMA controller.
[ 2.022879] dwmmc_rockchip fe2c0000.mmc: Version ID is 270a
[ 2.022898] dwmmc_rockchip fe2c0000.mmc: DW MMC controller at irq 91,32 bit host data width,256 deep fifo
[ 2.022904] dwmmc_rockchip fe2d0000.mmc: Using internal DMA controller.
[ 2.022918] dwmmc_rockchip fe2d0000.mmc: Version ID is 270a
[ 2.022962] dwmmc_rockchip fe2d0000.mmc: DW MMC controller at irq 92,32 bit host data width,256 deep fifo
[ 2.023135] dwmmc_rockchip fe2c0000.mmc: Failed getting OCR mask: -22
[ 2.023416] dwmmc_rockchip fe2c0000.mmc: could not set regulator OCR (-22)
[ 2.023421] dwmmc_rockchip fe2c0000.mmc: failed to enable vmmc regulator
[ 2.023599] arm-scmi firmware:scmi: Failed. SCMI protocol 17 not active.
[ 2.023623] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[ 2.024266] cryptodev: driver 1.12 loaded.
[ 2.024287] hid: raw HID events driver (C) Jiri Kosina
[ 2.024440] usbcore: registered new interface driver usbhid
[ 2.024443] usbhid: USB HID core driver
[ 2.027134] optee: probing for conduit method.
[ 2.027150] optee: revision 3.13 (b5340fd6)
[ 2.027370] optee: dynamic shared memory is enabled
[ 2.027468] optee: initialized driver
[ 2.027994] usbcore: registered new interface driver snd-usb-audio
[ 2.034170] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 2.054900] mmc0: SDHCI controller on fe2e0000.mmc [fe2e0000.mmc] using ADMA
[ 2.063191] ES8323 7-0011: i2c recv Failed
[ 2.065134] rockchip-i2s-tdm fddf0000.i2s: CLK-ALWAYS-ON: mclk: 12288000, bclk: 3072000, fsync: 48000
[ 2.065890] rockchip-i2s-tdm fddf4000.i2s: CLK-ALWAYS-ON: mclk: 12288000, bclk: 3072000, fsync: 48000
[ 2.067645] debugfs: File 'Capture' in directory 'dapm' already present!
[ 2.079534] input: rockchip,hdmiin rockchip,hdmiin as /devices/platform/hdmiin-sound/sound/card0/input1
[ 2.080404] Initializing XFRM netlink socket
[ 2.080568] NET: Registered protocol family 10
[ 2.081070] Segment Routing with IPv6
[ 2.081101] NET: Registered protocol family 17
[ 2.081116] NET: Registered protocol family 15
[ 2.081348] Bluetooth: RFCOMM socket layer initialized
[ 2.081359] Bluetooth: RFCOMM ver 1.11
[ 2.081365] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 2.081370] Bluetooth: HIDP socket layer initialized
[ 2.081395] [BT_RFKILL]: Enter rfkill_rk_init
[ 2.081399] [WLAN_RFKILL]: Enter rfkill_wlan_init
[ 2.081638] [WLAN_RFKILL]: Enter rfkill_wlan_probe
[ 2.081654] [WLAN_RFKILL]: can't find rockchip,grf property
[ 2.081658] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi_chip_type = ap6398s
[ 2.081661] [WLAN_RFKILL]: wlan_platdata_parse_dt: enable wifi power control.
[ 2.081665] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi power controled by gpio.
[ 2.081680] [WLAN_RFKILL]: wlan_platdata_parse_dt: WIFI,poweren_gpio = 20 flags = 0.
[ 2.081692] [WLAN_RFKILL]: wlan_platdata_parse_dt: WIFI,host_wake_irq = 10, flags = 0.
[ 2.081697] [WLAN_RFKILL]: wlan_platdata_parse_dt: The ref_wifi_clk not found !
[ 2.081701] [WLAN_RFKILL]: rfkill_wlan_probe: init gpio
[ 2.081705] [WLAN_RFKILL]: rfkill_set_wifi_bt_power: 1
[ 2.081709] [WLAN_RFKILL]: Exit rfkill_wlan_probe
[ 2.081863] Key type dns_resolver registered
[ 2.082521] imx415 3-001a: driver version: 00.01.08
[ 2.082531] imx415 3-001a: Get hdr mode failed! no hdr default
[ 2.082547] imx415 3-001a: Failed to get reset-gpios
[ 2.082556] imx415 3-001a: Failed to get power-gpios
[ 2.082561] imx415 3-001a: could not get default pinstate
[ 2.082564] imx415 3-001a: could not get sleep pinstate
[ 2.082581] imx415 3-001a: supply dvdd not found, using dummy regulator
[ 2.082637] imx415 3-001a: supply dovdd not found, using dummy regulator
[ 2.092037] mmc0: Host Software Queue enabled
[ 2.092049] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[ 2.092339] mmcblk0: mmc0:0001 A3A552 58.3 GiB
[ 2.092429] mmcblk0boot0: mmc0:0001 A3A552 partition 1 4.00 MiB
[ 2.092514] mmcblk0boot1: mmc0:0001 A3A552 partition 2 4.00 MiB
[ 2.092626] mmcblk0rpmb: mmc0:0001 A3A552 partition 3 16.0 MiB, chardev (236:0)
[ 2.095038] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
[ 2.178298] imx415 3-001a: Unexpected sensor id(000000), ret(-5)
[ 2.178798] Loading compiled-in X.509 certificates
[ 2.179786] pstore: Using crash dump compression: deflate
[ 2.180264] rga3_core0 fdb60000.rga: Adding to iommu group 2
[ 2.180507] rga: rga3_core0, irq = 36, match scheduler
[ 2.180989] rga: rga3_core0 hardware loaded successfully, hw_version:3.0.76831.
[ 2.181054] rga: rga3_core0 probe successfully
[ 2.181673] rga3_core1 fdb70000.rga: Adding to iommu group 3
[ 2.181888] rga: rga3_core1, irq = 37, match scheduler
[ 2.182340] rga: rga3_core1 hardware loaded successfully, hw_version:3.0.76831.
[ 2.182408] rga: rga3_core1 probe successfully
[ 2.182959] rga: rga2, irq = 38, match scheduler
[ 2.183378] rga: rga2 hardware loaded successfully, hw_version:3.2.63318.
[ 2.183396] rga: rga2 probe successfully
[ 2.183735] rga_iommu: IOMMU binding successfully, default mapping core[0x1]
[ 2.183914] rga: Module initialized. v1.3.0
[ 2.197163] vendor storage:20190527 ret = 0
[ 2.200314] mali fb000000.gpu: Kernel DDK version g18p0-01eac0
[ 2.200494] pcie20_avdd0v85: supplied by vdd_0v85_s0
[ 2.200831] dwmmc_rockchip fe2d0000.mmc: No normal pinctrl state
[ 2.200838] dwmmc_rockchip fe2d0000.mmc: No idle pinctrl state
[ 2.200908] dwmmc_rockchip fe2d0000.mmc: IDMAC supports 32-bit address mode.
[ 2.200919] dwmmc_rockchip fe2d0000.mmc: Using internal DMA controller.
[ 2.200925] dwmmc_rockchip fe2d0000.mmc: Version ID is 270a
[ 2.200940] dwmmc_rockchip fe2d0000.mmc: DW MMC controller at irq 92,32 bit host data width,256 deep fifo
[ 2.201327] pcie20_avdd1v8: supplied by avcc_1v8_s0
[ 2.201363] mali fb000000.gpu: bin=2
[ 2.201555] mali fb000000.gpu: leakage=20
[ 2.201618] debugfs: Directory 'fb000000.gpu-mali' with parent 'vdd_gpu_s0' already present!
[ 2.201912] pcie30_avdd0v75: supplied by avdd_0v75_s0
[ 2.202424] pcie30_avdd1v8: supplied by avcc_1v8_s0
[ 2.202986] mali fb000000.gpu: pvtm=864
[ 2.203048] vcc3v3_lcd0_n: supplied by vcc_1v8_s0
[ 2.203141] mali fb000000.gpu: pvtm-volt-sel=3
[ 2.204429] mpp_rkvenc2 fdbd0000.rkvenc-core: Adding to iommu group 10
[ 2.204467] mali fb000000.gpu: avs=0
[ 2.204519] W : [File] : drivers/gpu/arm/bifrost/platform/rk/mali_kbase_config_rk.c; [Line] : 143; [Func] : kbase_platform_rk_init(); power-off-delay-ms not available.
[ 2.204841] mpp_rkvenc2 fdbd0000.rkvenc-core: probing start
[ 2.204971] mali fb000000.gpu: r0p0 status 5 not found in HW issues table;
[ 2.204985] mali fb000000.gpu: falling back to closest match: r0p0 status 0
[ 2.204994] mali fb000000.gpu: Execution proceeding normally with fallback match
[ 2.205006] mali fb000000.gpu: GPU identified as 0x7 arch 10.8.6 r0p0 status 0
[ 2.205061] mali fb000000.gpu: No priority control manager is configured
[ 2.205237] mali fb000000.gpu: No memory group manager is configured
[ 2.205274] mali fb000000.gpu: Protected memory allocator not available
[ 2.205816] mpp_rkvenc2 fdbd0000.rkvenc-core: bin=0
[ 2.206050] mpp_rkvenc2 fdbd0000.rkvenc-core: leakage=16
[ 2.206068] mpp_rkvenc2 fdbd0000.rkvenc-core: leakage-volt-sel=1
[ 2.206387] mali fb000000.gpu: Capping CSF_FIRMWARE_TIMEOUT to CSF_FIRMWARE_PING_TIMEOUT
[ 2.206749] mpp_rkvenc2 fdbd0000.rkvenc-core: avs=0
[ 2.206785] mali fb000000.gpu: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=800000000 h_table=0
[ 2.206792] mpp_rkvenc2 fdbd0000.rkvenc-core: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[ 2.207230] mpp_rkvenc2 fdbd0000.rkvenc-core: attach ccu as core 0
[ 2.207546] mpp_rkvenc2 fdbd0000.rkvenc-core: probing finish
[ 2.207836] mpp_rkvenc2 fdbe0000.rkvenc-core: Adding to iommu group 11
[ 2.208203] mali fb000000.gpu: Probed as mali0
[ 2.208251] mpp_rkvenc2 fdbe0000.rkvenc-core: probing start
[ 2.209270] mpp_rkvenc2 fdbe0000.rkvenc-core: bin=0
[ 2.209460] mpp_rkvenc2 fdbe0000.rkvenc-core: leakage=16
[ 2.209476] mpp_rkvenc2 fdbe0000.rkvenc-core: leakage-volt-sel=1
[ 2.210117] mpp_rkvenc2 fdbe0000.rkvenc-core: avs=0
[ 2.210149] mpp_rkvenc2 fdbe0000.rkvenc-core: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[ 2.210589] mpp_rkvenc2 fdbe0000.rkvenc-core: attach ccu as core 1
[ 2.210877] mpp_rkvenc2 fdbe0000.rkvenc-core: probing finish
[ 2.212242] rockchip-dmc dmc: bin=2
[ 2.212428] rockchip-dmc dmc: leakage=38
[ 2.212445] rockchip-dmc dmc: leakage-volt-sel=1
[ 2.212464] rockchip-dmc dmc: soc version=2, speed=1
[ 2.213431] rockchip-dmc dmc: avs=0
[ 2.213452] rockchip-dmc dmc: current ATF version 0x100
[ 2.213567] rockchip-dmc dmc: normal_rate = 1560000000
[ 2.213578] rockchip-dmc dmc: reboot_rate = 2112000000
[ 2.213588] rockchip-dmc dmc: suspend_rate = 528000000
[ 2.213598] rockchip-dmc dmc: video_4k_rate = 1560000000
[ 2.213608] rockchip-dmc dmc: video_4k_10b_rate = 1560000000
[ 2.213617] rockchip-dmc dmc: video_svep_rate = 1560000000
[ 2.213627] rockchip-dmc dmc: boost_rate = 2112000000
[ 2.213636] rockchip-dmc dmc: fixed_rate(isp|cif0|cif1|dualview) = 2112000000
[ 2.213646] rockchip-dmc dmc: performance_rate = 2112000000
[ 2.213656] rockchip-dmc dmc: hdmirx_rate = 2112000000
[ 2.213670] rockchip-dmc dmc: failed to get vop bandwidth to dmc rate
[ 2.213679] rockchip-dmc dmc: failed to get vop pn to msch rl
[ 2.213824] rockchip-dmc dmc: l=10000 h=2147483647 hyst=5000 l_limit=0 h_limit=0 h_table=0
[ 2.213886] rockchip-dmc dmc: could not find power_model node
[ 2.214697] rockchip-csi2-dphy csi2-dphy0: --------------rockchip_csi2_dphy_probe come in
[ 2.215240] rockchip-csi2-dphy csi2-dphy0: csi2 dphy0 probe successfully!
[ 2.220170] input: adc-keys as /devices/platform/adc-keys/input/input2
[ 2.221085] <<GTP-INF>>[gt1x_ts_probe:560] GTP Driver Version: V1.4<2015/07/10>
[ 2.221092] <<GTP-INF>>[gt1x_ts_probe:561] GTP I2C Address: 0x14
[ 2.221126] <<GTP-ERR>>[gt1x_parse_dt:341] vdd_ana not specified, fallback to power-supply
[ 2.221281] <<GTP-INF>>[gt1x_parse_dt:348] Power Invert,no
[ 2.221326] <<GTP-INF>>[gt1x_reset_guitar:788] GTP RESET!
[ 2.222630] dwmmc_rockchip fe2d0000.mmc: No normal pinctrl state
[ 2.222638] dwmmc_rockchip fe2d0000.mmc: No idle pinctrl state
[ 2.222712] dwmmc_rockchip fe2d0000.mmc: IDMAC supports 32-bit address mode.
[ 2.222725] dwmmc_rockchip fe2d0000.mmc: Using internal DMA controller.
[ 2.222734] dwmmc_rockchip fe2d0000.mmc: Version ID is 270a
[ 2.222750] dwmmc_rockchip fe2d0000.mmc: DW MMC controller at irq 92,32 bit host data width,256 deep fifo
[ 2.225511] dwmmc_rockchip fe2d0000.mmc: No normal pinctrl state
[ 2.225518] dwmmc_rockchip fe2d0000.mmc: No idle pinctrl state
[ 2.225591] dwmmc_rockchip fe2d0000.mmc: IDMAC supports 32-bit address mode.
[ 2.225602] dwmmc_rockchip fe2d0000.mmc: Using internal DMA controller.
[ 2.225611] dwmmc_rockchip fe2d0000.mmc: Version ID is 270a
[ 2.225623] dwmmc_rockchip fe2d0000.mmc: DW MMC controller at irq 92,32 bit host data width,256 deep fifo
[ 2.226934] rkcif rkcif-mipi-lvds2: clear unready subdev num: 1
[ 2.227109] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[ 2.227117] rkcif-mipi-lvds2: Async subdev notifier completed
[ 2.227127] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[ 2.227131] rkcif-mipi-lvds2: There is not terminal subdev, not synchronized with ISP
[ 2.227230] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[ 2.227244] rkcif-mipi-lvds2: There is not terminal subdev, not synchronized with ISP
[ 2.228106] RKNPU fdab0000.npu: Adding to iommu group 0
[ 2.228246] RKNPU fdab0000.npu: RKNPU: rknpu iommu is enabled, using iommu mode
[ 2.229472] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdab0000-0xfdabffff]
[ 2.229492] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdac0000-0xfdacffff]
[ 2.229502] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdad0000-0xfdadffff]
[ 2.229899] [drm] Initialized rknpu 0.9.2 20230825 for fdab0000.npu on minor 0
[ 2.233328] RKNPU fdab0000.npu: RKNPU: bin=2
[ 2.233503] RKNPU fdab0000.npu: leakage=10
[ 2.233545] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present!
[ 2.240392] RKNPU fdab0000.npu: pvtm=869
[ 2.244446] RKNPU fdab0000.npu: pvtm-volt-sel=3
[ 2.245209] RKNPU fdab0000.npu: avs=0
[ 2.245343] RKNPU fdab0000.npu: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=800000000 h_table=0
[ 2.252831] RKNPU fdab0000.npu: failed to find power_model node
[ 2.252840] RKNPU fdab0000.npu: RKNPU: failed to initialize power model
[ 2.252845] RKNPU fdab0000.npu: RKNPU: failed to get dynamic-coefficient
[ 2.253586] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 2.255268] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 2.255402] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 2.255408] cfg80211: failed to load regulatory.db
[ 2.255956] dwmmc_rockchip fe2d0000.mmc: No normal pinctrl state
[ 2.255963] dwmmc_rockchip fe2d0000.mmc: No idle pinctrl state
[ 2.256034] dwmmc_rockchip fe2d0000.mmc: IDMAC supports 32-bit address mode.
[ 2.256045] dwmmc_rockchip fe2d0000.mmc: Using internal DMA controller.
[ 2.256054] dwmmc_rockchip fe2d0000.mmc: Version ID is 270a
[ 2.256071] dwmmc_rockchip fe2d0000.mmc: DW MMC controller at irq 92,32 bit host data width,256 deep fifo
[ 2.256242] rockchip-pm rockchip-suspend: not set pwm-regulator-config
[ 2.256510] rockchip-suspend not set sleep-mode-config for mem-lite
[ 2.256515] rockchip-suspend not set wakeup-config for mem-lite
[ 2.256521] rockchip-suspend not set sleep-mode-config for mem-ultra
[ 2.256526] rockchip-suspend not set wakeup-config for mem-ultra
[ 2.257471] I : [File] : drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c; [Line] : 406; [Func] : mali_module_init(); svn_rev_string_from_arm of this mali_ko is '', rk_ko_ver is '5', built at '16:14:57', on 'Nov 24 2024'.
[ 2.258137] Mali:
[ 2.258139] Mali device driver loaded
[ 2.258148] rkisp rkisp0-vir0: clear unready subdev num: 1
[ 2.258330] rkisp0-vir0: Async subdev notifier completed
[ 2.258337] ALSA device list:
[ 2.258341] #0: rockchip,hdmiin
[ 2.263394] dwmmc_rockchip fe2d0000.mmc: No normal pinctrl state
[ 2.263411] dwmmc_rockchip fe2d0000.mmc: No idle pinctrl state
[ 2.263509] dwmmc_rockchip fe2d0000.mmc: IDMAC supports 32-bit address mode.
[ 2.263534] dwmmc_rockchip fe2d0000.mmc: Using internal DMA controller.
[ 2.263549] dwmmc_rockchip fe2d0000.mmc: Version ID is 270a
[ 2.263580] dwmmc_rockchip fe2d0000.mmc: DW MMC controller at irq 92,32 bit host data width,256 deep fifo
[ 2.394161] rk3x-i2c fead0000.i2c: timeout, ipd: 0x90, state: 3
[ 2.394174] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 2.394180] <<GTP-ERR>>[gt1x_init:2319] Reset guitar failed!
[ 2.394185] <<GTP-INF>>[gt1x_reset_guitar:788] GTP RESET!
[ 2.567490] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 2.567501] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 2.567506] <<GTP-ERR>>[gt1x_init:2319] Reset guitar failed!
[ 2.567510] <<GTP-INF>>[gt1x_reset_guitar:788] GTP RESET!
[ 2.740823] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 2.740834] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 2.740840] <<GTP-ERR>>[gt1x_init:2319] Reset guitar failed!
[ 2.740844] <<GTP-INF>>[gt1x_reset_guitar:788] GTP RESET!
[ 2.914157] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 2.914169] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 2.914176] <<GTP-ERR>>[gt1x_init:2319] Reset guitar failed!
[ 2.914180] <<GTP-INF>>[gt1x_reset_guitar:788] GTP RESET!
[ 3.087492] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 3.087504] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 3.087510] <<GTP-ERR>>[gt1x_init:2319] Reset guitar failed!
[ 3.087515] <<GTP-ERR>>[gt1x_init:2345] Init failed, use default setting
[ 3.190823] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 3.190835] <<GTP-ERR>>[_do_i2c_read:390] I2c Transfer error! (-110)
[ 3.190842] <<GTP-ERR>>[gt1x_get_chip_type:895] I2c communication error.
[ 3.190847] <<GTP-ERR>>[gt1x_init:2355] Get chip type failed!
[ 3.297491] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 3.297503] <<GTP-ERR>>[_do_i2c_read:390] I2c Transfer error! (-110)
[ 3.297508] <<GTP-ERR>>[gt1x_read_version:845] Read version failed!
[ 3.510824] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 3.510837] <<GTP-ERR>>[_do_i2c_read:390] I2c Transfer error! (-110)
[ 3.510843] <<GTP-ERR>>[gt1x_read_version:845] Read version failed!
[ 3.724157] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 3
[ 3.724169] <<GTP-ERR>>[_do_i2c_read:390] I2c Transfer error! (-110)
[ 3.724176] <<GTP-ERR>>[gt1x_read_version:845] Read version failed!
[ 3.830823] <<GTP-INF>>[gt1x_read_version:863] IC VERSION:GT_000000(Patch)_0000(Mask)_00(SensorID)
[ 3.830835] <<GTP-INF>>[gt1x_init_panel:606] Config group0 used, length:239
[ 3.830840] <<GTP-INF>>[gt1x_init_panel:657] X_MAX=4096,Y_MAX=4096,TRIGGER=0x01,WAKEUP_LEVEL=1
[ 3.960823] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 2
[ 3.960835] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 4.068491] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_cancel_cpu_limit_freq freq qos nod add
[ 4.090822] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 2
[ 4.090835] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 4.220823] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 2
[ 4.220835] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 4.350823] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 2
[ 4.350835] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 4.480823] rk3x-i2c fead0000.i2c: timeout, ipd: 0x80, state: 2
[ 4.480836] <<GTP-ERR>>[_do_i2c_write:432] I2c transfer error! (-110)
[ 4.480842] <<GTP-ERR>>[gt1x_send_cfg:551] Send config failed!
[ 4.480847] <<GTP-ERR>>[gt1x_init:2367] Init panel failed.
[ 4.481108] <<GTP-ERR>>[gt1x_ts_probe:587] GTP init failed!!!
[ 4.481225] Goodix-TS-GT1X: probe of 5-0014 failed with error -2147483644
[ 4.534846] EXT4-fs (mmcblk0p6): recovery complete
[ 4.534959] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[ 4.534987] VFS: Mounted root (ext4 filesystem) on device 179:6.
[ 4.535350] devtmpfs: mounted
[ 4.539335] Freeing unused kernel memory: 6656K
[ 4.539424] Run /sbin/init as init process
[ 4.539429] with arguments:
[ 4.539433] /sbin/init
[ 4.539438] with environment:
[ 4.539442] HOME=/
[ 4.539447] TERM=linux
[ 4.539450] storagemedia=emmc
[ 4.641781] systemd[1]: System time before build time, advancing clock.
[ 4.645246] systemd[1]: Failed to look up module alias 'autofs4': Function not implemented
Welcome to Debian GNU/Linux 11 (bullseye)!
Configuration file /lib/systemd/system/rkaiq_3A.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.
/lib/systemd/system/bootanim.service:9: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
system-getty.slice: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
(This warning is only shown for the first unit using IP firewalling.)
[ OK ] Created slice system-getty.slice.
[ OK ] Created slice system-modprobe.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-systemd\x2dfsck.slice.
[ OK ] Created slice User and Session Slice.
[ OK ] Started Dispatch Password …ts to Console Directory Watch.
[ OK ] Started Forward Password R…uests to Wall Directory Watch.
[ OK ] Reached target Local Encrypted Volumes.
[ OK ] Reached target Remote File Systems.
[ OK ] Reached target Slices.
[ OK ] Reached target Swap.
[ OK ] Listening on Syslog Socket.
[ OK ] Listening on fsck to fsckd communication Socket.
[ OK ] Listening on initctl Compatibility Named Pipe.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on udev Kernel Socket.
Mounting /sys/kernel/config...
Mounting /sys/kernel/debug...
Mounting Kernel Trace File System...
Starting Enable ASYNC_COMM…r Rockchip BSP kernel > 4.4...
Starting Set the console keyboard layout...
Starting Load Kernel Module drm...
Starting Load Kernel Module fuse...
[ OK ] Started Nameserver information manager.
[ OK ] Reached target Network (Pre).
Starting Enable Rockchip camera engine rkaiq...
Starting Journal Service...
Starting Load Kernel Modules...
Starting Remount Root and Kernel File Systems...
Starting Coldplug All udev Devices...
[ OK ] Mounted /sys/kernel/config.
[ OK ] Mounted /sys/kernel/debug.
[ OK ] Mounted Kernel Trace File System.
[ OK ] Finished Enable ASYNC_COMM…for Rockchip BSP kernel > 4.4.
[ OK ] Finished Load Kernel Module drm.
[ OK ] Finished Load Kernel Module fuse.
Mounting FUSE Control File System...
[ OK ] Finished Load Kernel Modules.
Starting Apply Kernel Variables...
[ OK ] Started Enable Rockchip camera engine rkaiq.
[ OK ] Mounted FUSE Control File System.
[ OK ] Finished Apply Kernel Variables.
[ OK ] Finished Remount Root and Kernel File Systems.
Starting Load/Save Random Seed...
Starting Create System Users...
[ OK ] Finished Create System Users.
Starting Create Static Device Nodes in /dev...
[ OK ] Finished Load/Save Random Seed.
[ OK ] Finished Create Static Device Nodes in /dev.
Starting Rule-based Manage…for Device Events and Files...
[ OK ] Started Rule-based Manager for Device Events and Files.
[ OK ] Started Journal Service.
Starting Flush Journal to Persistent Storage...
[ 5.134063] systemd-journald[256]: Received client request to flush runtime journal.
[ 5.137766] systemd-journald[256]: File /var/log/journal/5bc462e01127476b8fd7d2e4db1e402c/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ OK ] Finished Coldplug All udev Devices.
Starting Helper to synchronize boot up for ifupdown...
[ OK ] Finished Helper to synchronize boot up for ifupdown.
[ OK ] Finished Flush Journal to Persistent Storage.
[ OK ] Created slice system-systemd\x2dbacklight.slice.
Starting Load/Save Screen …ness of backlight:backlight...
[ OK ] Finished Load/Save Screen …htness of backlight:backlight.
[ OK ] Found device /dev/disk/by-partlabel/userdata.
[ OK ] Found device /dev/disk/by-partlabel/oem.
[ 5.482742] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[ 5.482765] stream_cif_mipi_id0: update sensor info failed -19
[ 5.485210] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[1] get remote terminal sensor failed!
[ OK ] Found device /dev/ttyFIQ0.
[ 5.485223] stream_cif_mipi_id1: update sensor info failed -19
[ 5.485460] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[ 5.485468] rkcif_scale_ch0: update sensor info failed -19
[ 5.489131] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[ 5.489155] rkcif_tools_id0: update sensor info failed -19
[ 5.489256] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[3] get remote terminal sensor failed!
[ 5.489264] rkcif_scale_ch3: update sensor info failed -19
[ 5.494968] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[3] get remote terminal sensor failed!
[ 5.494988] stream_cif_mipi_id3: update sensor info failed -19
[ 5.495792] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[1] get remote terminal sensor failed!
[ 5.495803] rkcif_scale_ch1: update sensor info failed -19
[ 5.497977] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[2] get remote terminal sensor failed!
[ 5.497990] stream_cif_mipi_id2: update sensor info failed -19
[ 5.499120] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[2] get remote terminal sensor failed!
[ 5.499130] rkcif_scale_ch2: update sensor info failed -19
[ 5.506207] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[1] get remote terminal sensor failed!
[ 5.506226] rkcif_tools_id1: update sensor info failed -19
[ 5.508154] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[2] get remote terminal sensor failed!
[ 5.508168] rkcif_tools_id2: update sensor info failed -19
[ OK ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
Starting Enable ASYNC_COMM…r Rockchip BSP kernel > 4.4...
Starting Enable Rockchip camera engine rkaiq...
[ OK ] Finished Enable ASYNC_COMM…for Rockchip BSP kernel > 4.4.
[ OK ] Started Enable Rockchip camera engine rkaiq.
[ OK ] Finished Set the console keyboard layout.
[ OK ] Reached target Local File Systems (Pre).
Starting File System Check… /dev/disk/by-partlabel/oem...
Starting File System Check…/disk/by-partlabel/userdata...
[ OK ] Started File System Check Daemon to report status.
[ OK ] Finished File System Check on /dev/disk/by-partlabel/oem.
Mounting /oem...
[ OK ] Mounted /oem.n 1 disk (95.0% complete)
[ 6.042706] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: (null)
[ OK ] Finished File System Check…ev/disk/by-partlabel/userdata.
[ 6.073922] EXT4-fs (mmcblk0p8): mounted filesystem without journal. Opts: (null)
Mounting /userdata...
[ OK ] Mounted /userdata.
[ OK ] Reached target Local File Systems.
Starting Enable support fo…l executable binary formats...
Starting Boot time animation...
Starting Set console font and keymap...
Starting Raise network interfaces...
Starting Resize all internal mounted partitions...
[ OK ] Started Setup rockchip platform environment.
Starting Create Volatile Files and Directories...
Starting Manage USB device functions...
Starting Init Rockchip Wifi/BT...
[ OK ] Finished Enable support fo…nal executable binary formats.
[ OK ] Finished Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Boot time animation.
[ OK ] Finished Update UTMP about System Boot/Shutdown.
[ OK ] Reached target System Initialization.
[ OK ] Started ACPI Events Check.
[ OK ] Started Trigger anacron every hour.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Started Periodic ext4 Onli…ata Check for All Filesystems.
[ OK ] Started Discard unused blocks once a week.
[ OK ] Started Daily man-db regeneration.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Reached target Paths.
[ OK ] Reached target Timers.
[ OK ] Listening on ACPID Listen Socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Listening on triggerhappy.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
[ OK ] Started ACPI event daemon.
Starting Save/Restore Sound Card State...
[ OK ] Started Run anacron jobs.
Starting Bluetooth management mechanism...
[ OK ] Started D-Bus System Message Bus.
Starting Network Manager...
Starting Remove Stale Onli…t4 Metadata Check Snapshots...
[ OK ] Started irqbalance daemon.
Starting LSB: Load kernel …d to enable cpufreq scaling...
Starting System Logging Service...
Starting User Login Management...
Starting triggerhappy global hotkey daemon...
Starting Disk Manager...
Starting WPA supplicant...
[ OK ] Started Init Rockchip Wifi/BT.
[ OK ] Finished Save/Restore Sound Card State.
[ OK ] Reached target Sound Card.
[ OK ] Started triggerhappy global hotkey daemon.
[ OK ] Started System Logging Service.
[ OK ] Finished Raise network interfaces.
[ OK ] Finished Remove Stale Onli…ext4 Metadata Check Snapshots.
[ OK ] Started WPA supplicant.
[ OK ] Started User Login Management.
[ OK ] Started LSB: Load kernel m…ded to enable cpufreq scaling.
Starting LSB: set CPUFreq kernel parameters...
Starting Authorization Manager...
[ OK ] Started Network Manager.
[ OK ] Reached target Network.
[ OK ] Reached target Network is Online.
Starting Network Time Service...
Starting OpenVPN service...
Starting /etc/rc.local Compatibility...
Starting OpenBSD Secure Shell server...
[ OK ] Started strongSwan IPsec I…IKEv2 daemon using ipsec.conf.
Starting Permit User Sessions...
Starting LSB: layer 2 tunelling protocol daemon...
[ OK ] Started LSB: set CPUFreq kernel parameters.
[ OK ] Finished OpenVPN service.
[ OK ] Started /etc/rc.local Compatibility.
Starting Hostname Service...
[ OK ] Started Authorization Manager.
[ OK ] Finished Permit User Sessions.
[ OK ] Started Getty on tty1.
Starting Light Display Manager...
[ OK ] Started Serial Getty on ttyFIQ0.
[ OK ] Reached target Login Prompts.
[ OK ] Started Network Time Service.
[ OK ] Started LSB: layer 2 tunelling protocol daemon.
[ OK ] Started Light Display Manager.
[ OK ] Started OpenBSD Secure Shell server.
[ OK ] Started Disk Manager.
[ OK ] Started Hostname Service.
[ 6.586332] file system registered
Starting Network Manager Script Dispatcher Service...
[ 6.606526] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 6.606548] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 6.628494] read descriptors
[ 6.628520] read strings
[ 6.641776] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 6.641818] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ OK ] Started Network Manager Script Dispatcher Service.
[ 6.669529] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 6.669576] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 6.682583] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 6.682604] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 6.688644] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 6.688663] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ OK ] Started Manage USB device functions.
[ OK ] Finished Resize all internal mounted partitions.
[ OK ] Started Bluetooth management mechanism.
[ OK ] Reached target Multi-User System.
[ OK ] Stopped Light Display Manager.
Starting Light Display Manager...
[ OK ] Started Light Display Manager.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Finished Update UTMP about System Runlevel Changes.
[ OK ] Stopped Light Display Manager.
Starting Light Display Manager...
[ OK ] Started Light Display Manager.
[ OK ] Stopped Light Display Manager.
Starting Light Display Manager...
[ OK ] Started Light Display Manager.
[ OK ] Stopped Light Display Manager.
Starting Light Display Manager...
[ OK ] Started Light Display Manager.
[ OK ] Finished Set console font and keymap.
[ 8.742553] ttyFIQ ttyFIQ0: tty_port_close_start: tty->count = 1 port count = 2
root@linaro-alip:/#
[ 62.297556] phy phy-fd5dc000.syscon:usb2-phy@c000.2: Disconnected
[ 62.297576] phy phy-fd5dc000.syscon:usb2-phy@c000.2: port power off
[ 62.297592] phy phy-fd5d8000.syscon:usb2-phy@8000.1: Disconnected
[ 62.297597] phy phy-fd5d8000.syscon:usb2-phy@8000.1: port power off
[ 307.238136] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 307.238154] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 307.244399] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 307.244414] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 307.249674] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 307.249685] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 307.255110] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 307.255120] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 607.238096] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 607.238115] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 607.243824] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 607.243840] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 607.249217] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 607.249229] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 607.254643] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 607.254653] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 907.238205] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 907.238223] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 907.243966] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 907.243993] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 907.249212] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 907.249223] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 907.254409] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 907.254419] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 1207.238263] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 1207.238282] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 1207.244198] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 1207.244213] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 1207.249827] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 1207.249840] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[ 1207.254992] rk_gmac-dwmac fe1c0000.ethernet eth0: no phy at addr -1
[ 1207.255003] rk_gmac-dwmac fe1c0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
fiq_debugger: cpu 0 not responding, reverting to cpu 7
root@linaro-alip:/#
二、其他常见用法
为了方便开发者使用,在linux
内核中除了直接使用printk
加消息级别的方式,内核还提供了pr_xx
和dev_xx
系列的打印接口,本质上,它们都是基于printk
实现的。其中:
pr_xx
系列函数简化了日志级别的使用;dev_xx
系列函数可以用于设备驱动程序中,便于打印设备相关的信息;
2.1 pr_xx
系列函数
在<linux/printk.h>
中定义了pr_notice
、pr_info
、pr_warn
、pr_err
等接口。使用这些 pr_xxx
接口,就可以省去指定消息级别的麻烦。
#define pr_emerg(fmt, ...) printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
#define pr_alert(fmt, ...) printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
#define pr_crit(fmt, ...) printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
#define pr_err(fmt, ...) printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
#define pr_warning(fmt, ...) printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
#define pr_warn pr_warning
#define pr_notice(fmt, ...) printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
#define pr_info(fmt, ...) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
#ifdef DEBUG
#define pr_devel(fmt, ...) \
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#else
#define pr_devel(fmt, ...) \
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#endif
#if defined(CONFIG_DYNAMIC_DEBUG)
#define pr_debug(fmt, ...) \
dynamic_pr_debug(fmt, ##__VA_ARGS__)
#elif defined(DEBUG)
#define pr_debug(fmt, ...) \
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#else
#define pr_debug(fmt, ...) \
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#endif
如上各pr_xx
定义,都是对printk+
日志级别的封装,故都能和prink
一样在linux
内核中直接使用;
但是对于pr_devel
需要在定义了DEBUG
宏,pr_debug
需要在定义了DEBUG
或CONFIG_DYNAMIC_DEBUG
宏才有实意。
2.2 dev_xx
系列函数
在<linux/dev_printk.h>
里也提供了一些驱动模型诊断宏,例如dev_err
、dev_warn
、dev_info
等等。使用它们,不仅可以按标记的消息级别打印,还会打印对应的设备和驱动信息,这对于驱动调试来说相当重要。
#define dev_emerg(dev, fmt, ...) \
dev_printk_index_wrap(_dev_emerg, KERN_EMERG, dev, dev_fmt(fmt), ##__VA_ARGS__)
#define dev_crit(dev, fmt, ...) \
dev_printk_index_wrap(_dev_crit, KERN_CRIT, dev, dev_fmt(fmt), ##__VA_ARGS__)
#define dev_alert(dev, fmt, ...) \
dev_printk_index_wrap(_dev_alert, KERN_ALERT, dev, dev_fmt(fmt), ##__VA_ARGS__)
#define dev_err(dev, fmt, ...) \
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
#define dev_warn(dev, fmt, ...) \
dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
#define dev_notice(dev, fmt, ...) \
dev_printk_index_wrap(_dev_notice, KERN_NOTICE, dev, dev_fmt(fmt), ##__VA_ARGS__)
#define dev_info(dev, fmt, ...) \
dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
#if defined(CONFIG_DYNAMIC_DEBUG) || \
(defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE))
#define dev_dbg(dev, fmt, ...) \
dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
#elif defined(DEBUG)
#define dev_dbg(dev, fmt, ...) \
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
#else
#define dev_dbg(dev, fmt, ...) \
({ \
if (0) \
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
})
#endif
如上dev_xx
定义,其和pr_xx
类似,都可以直接理解为printk+
日志级别的封装,一般在linux
驱动程序中使用;
同样需要注意,dev_dbg
也不是无条件打印的,除非定义了DEBUG
或设定了CONFIG_DYNAMIC_DEBUG
。一个相关约定是在已经开启了DEBUG
时,使用VERBOSE_DEBUG
来添加dev_vdbg
。
2.3 测试
目前在内核驱动代码中,都不再建议直接使用printk
直接添加打印信息,而是使用dev_info
、dev_dbg
、dev_err
之类的函数代替,虽然这些dev_xxx
函数的本质还是使用printk
打印的,但是相比起printk
,dev_xxx
的好处是:
- 支持打印模块信息、
dev
信息; - 支持动态调试(
dynamic debug
)方式;
比如,如下代码:
dev_warn(&rtc->dev, "invalid alarm value: %ptR\n", &alarm->time); // %ptR输出时间
输出日志如下:
rtc rtc0: invalid alarm value: 1900-02-01T00:00:00
三、实现原理
之前我们说printk
会将日志输出到控制台,比如我们在uboot
的bootargs
里配置console=ttySA0,115200
,这样将会将日志信息输出在串口UART0
上。
同样如果配置console=tty1 console=ttySA0,115200
,将会同时将将日志信息输出到串口UART0
以及LCD
屏幕上。
显然printk
根据命令行参数来调用不同控制台的硬件处理函数来输出日志。接下来我们研究一下printk
函数的源码。
3.1 printk
函数
我们看一下printk
函数调用栈,首先定位到printk
函数,函数定义在kernel/printk/printk.c
;
/**
* printk - print a kernel message
* @fmt: format string
*
* This is printk(). It can be called from any context. We want it to work.
*
* We try to grab the console_lock. If we succeed, it's easy - we log the
* output and call the console drivers. If we fail to get the semaphore, we
* place the output into the log buffer and return. The current holder of
* the console_sem will notice the new output in console_unlock(); and will
* send it to the consoles before releasing the lock.
*
* One effect of this deferred printing is that code which calls printk() and
* then changes console_loglevel may break. This is because console_loglevel
* is inspected when the actual printing occurs.
*
* See also:
* printf(3)
*
* See the vsnprintf() documentation for format string extensions over C99.
*/
asmlinkage __visible int printk(const char *fmt, ...)
{
va_list args;
int r;
va_start(args, fmt);
r = vprintk_func(fmt, args);
va_end(args);
return r;
}
该函数最终会调用vprintk_func
,参数args
和fmt
的值就是我们printk
传入的参数。
va_start
和va_end
宏定义如下:
#define va_start(v, l) __builtin_va_start(v, l)
#define va_end(v) __builtin_va_end(v)
3.1.1 vprintk_func
vprintk_func
函数定义在kernel/printk/printk_safe.c
;
//关于vprintk_func()函数,首先来看如下的宏定义:
#define __printf(a, b) __attribute__((__format__(printf, a, b)))
//该宏定义主要通过__format__属性,来让编译器按照printf()函数的参数格式来对函数的参数进行检查。
__printf(1, 0) int vprintk_func(const char *fmt, va_list args)
{
/*
* Try to use the main logbuf even in NMI. But avoid calling console
* drivers that might have their own locks.
*/
if ((this_cpu_read(printk_context) & PRINTK_NMI_DIRECT_CONTEXT_MASK) &&
raw_spin_trylock(&logbuf_lock)) {
int len;
len = vprintk_store(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args);
raw_spin_unlock(&logbuf_lock);
defer_console_output();
return len;
}
/* Use extra buffer in NMI when logbuf_lock is taken or in safe mode. */
if (this_cpu_read(printk_context) & PRINTK_NMI_CONTEXT_MASK)
return vprintk_nmi(fmt, args);
/* Use extra buffer to prevent a recursion deadlock in safe mode. */
if (this_cpu_read(printk_context) & PRINTK_SAFE_CONTEXT_MASK)
return vprintk_safe(fmt, args);
/* No obstacles. */
return vprintk_default(fmt, args);
}
可以看到,这个函数有三个分支:vprintk_nmi
、vprintk_safe
、vprintk_default
。其中:
vprintk_default
:正常走的分支;vprintk_nmi
:在nmi
中断中调用printk
走的分支;vprintk_safe
:在不安全的上下文中调用printk
走的分支。
下面我们主要以vprintk_default
为例分析。
3.1.2 vprintk_default
我们知道,printk
最终会将日志信息保存在内核日志缓冲区__log_buf
中。如果多核同时调用printk
,则最简单的情况,都走到vprintk_default
分支,最终是由logbuf_lock_irqsave
以及logbuf_unlock_irqrestore
来完成并发处理的。
int vprintk_default(const char *fmt, va_list args)
{
int r;
//假设配置中,未开启KGDB,则直接执行vprintk_emit函数。
#ifdef CONFIG_KGDB_KDB
if (unlikely(kdb_trap_printk && kdb_print_cpu < 0)) {
r = vkdb_printf(KDB_MSGRC_PRINTK, fmt, args);
}
#endif
r = vprintk_emit(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args); //这里,默认日志等级为-1,即#define LOGLEVEL_DEFAULT -1。
return r;
}
asmlinkage int vprintk_emit(int facility, int level, const char *dict, size_t ditclen, const char *fmt, va_list args)
{
int printed_len;
bool in_sched = false, pending_output;
unsigned long flags;
u64 curr_log_seq;
if (unlikely(suppress_printk)) //suppress_printk为全局只读变量,假设该值当前为0。
return 0;
if (level == LOGLEVEL_SCHED) { //在当前情况下,level并不为LOGLEVEL_SCHED,因此条件不成立
level = LOGLEVEL_DEFAULT;
in_sched = true;
}
//延时
boot_delay_msce(level);
prinkt_delay();
logbuf_lock_irqsave(flags);
curr_log_seq = log_next_seq;
printed_len = vprintk_store(facility, level, dict, dictlen, fmt, args); //将所要输出的内容保存到内核日志缓冲区log_buf
pending_output = (curr_log_seq != log_next_seq)
logbuf_unlock_irqrestore(flags);
if (!in_sched && pending_output) { //in_sched为false,且pending_output为true。因此,该条件成立
...
preempt_disable();
if (console_trylock_spinning())
console_unlock(); //根据设定的日志级别决定是否将日志缓冲中的内容输出到console
premmpt_enable();
}
...
}
vprintk_default
的流程大致可以分为两步:
- 调用
vprintk_store
将所有日志输出到内核的日志缓冲区,该日志缓冲区是一个循环缓冲区,其地址可以在内核中用log_buf
变量访问; - 调用
console_unlock
根据设定的日志级别决定是否将日志输出到console
;
3.1.3 vprintk_store
vprintk_store
将所有日志输出到内核的日志缓冲区log_buf
中;
//将所要输出的内容保存到内核日志缓冲区log_buf
int vprintk_store(int facility, int level, const char *dict, size_t dictlen, const char *fmt, va_list args)
{
static char textbuf[LOG_LINE_MAX];
char *text = textbuf;
size_t text_len;
enum log_flags lflags = 0;
text_len = vscnprintf(text, sizeof(textbuf), fmt, args); //该函数最终通过调用vsprintf()函数,vsprintf函数通过对fmt进行解析,将参数按照fmt格式填入,并将最终字符串写入text中。text_len表示写入的字节数。
if (text_len && text[text_len - 1] == '\n') {
text_len--;
lflags |= LOG_NEWLINE;
}
if (facility == 0) {
int kern_level;
while ((kern_level = printk_get_level(text)) != 0) {//如果text的首字符为‘\001’,且第二字符为0~7或c,则返回第二字符。否则,返回0。假设当前返回值为0。
switch (kern_level) {
case '0' ... '7':
if (level == LOGLEVEL_DEFAULT)
level = kern_level - '0';
break;
case 'c':
lflags |= LOG_CONT;
}
text_len -= 2;
text += 2;
}
}
if (level == LOGLEVEL_DEFAULT) //如果等级为默认的,则将其值更改为dafault_message_loglevel。
level = default_message_loglevel;
if (dict)
lflags |= LOG_NEWLINE;
//开始调用日志输出函数。
return log_output(facility, level, lflags, dict, dictlen, text, text_len);
}
static size_t log_output(int facility, int level, enum log_flags lflags, const char *dict, size_t dictlen, char *text, size_t text_len)
{
const u32 caller_id = printk_caller_id(); //首先获取一个caller_id,即当前的进程号。
if (cont.len) { //cont为类型为struct cont的全局变量,启动阶段cont.len为0。跳过该执行条件
if (cont.caller_id == caller_id && (lflags & LOG_CONT)) {
if (cont_add(caller_id, facility, level, lflags, text, text_len))
return text_len;
}
cont_flush();
}
if (!text_len && (lflags & LOG_CONT))
return 0;
if (!(lflags & LOG_NEWLINE)) { //假设当前输出的内容为完整的一行内容,也会跳过该执行条件
if (cont_add(caller_id, facility, level, lflags, text, text_len))
return text_len;
}
//将所要输出的内容保存到内核日志缓冲区log_buf
return log_store(caller_id, facility, level, lflags, 0, dict, dictlen, text, text_len);
}
static int log_store(u32 caller_id, int facility, int level, enum log_flags flags, u64 ts_nsec, const char *dict, u16 dict_len, const char *text, u16 text_len)
{
...
msg = (struct printk_log *)(log_buf + log_next_idx); //申请struct printk_log结构体对象,log_buf就是内核日志缓冲区
memcpy(log_text(msg), text, text_len); //将所要输出的内容复制到申请的struct printk_log结构体对象中
msg->text_len = text_len;
...
/* insert message */
log_next_idx += msg->len;
log_next_seq++;
return msg->text_len;
}
其中log_text
函数定义如下:
/* human readable text of the record */
static char *log_text(const struct printk_log *msg)
{
return (char *)msg + sizeof(struct printk_log);
}
在上述代码中出现了两个结构体,这里对它们进行简单的说明:
struct printk_log {
u64 ts_nsec;
u16 len;
u16 text_len;
u16 dict_len;
u8 facility;
u8 flags:5;
u8 level:3;
#iddef CONFIG_PRINTK_CALLER
u32 caller_id
#endif
}
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
__packed __aligned(4)
#endif
;
static struct cont {
char buf[LOG_LINE_MAX];
size_t len;
u32 caller_id;
u64 ts_nesc;
u8 level;
u8 facility;
enum log_flags flags;
} cont;
3.1.4 console_unlock
通过log_store
函数可以知道printk
函数将所要输出的日志全部存储到内核日志缓冲区log_buf
的一段空间中。内核中有一些全局变量会记录当前日志缓冲区log_buf
以及console
的状态信息;
/* the next printk record to read by syslog(READ) or /proc/kmsg */
static u64 syslog_seq;
static u32 syslog_idx;
static size_t syslog_partial;
static bool syslog_time;
/* index and sequence number of the first record stored in the buffer */
static u64 log_first_seq;
static u32 log_first_idx; // 第一条日志在log_buf的索引,为什么记录这个?是因为log_buf是作为环形缓冲区使用的,所以要记录日志存储的起始位置;
/* index and sequence number of the next record to store in the buffer */
static u64 log_next_seq; // 日志的总数量
static u32 log_next_idx; // 下一条日志写入log_buf的索引
/* the next printk record to write to the console */
static u64 console_seq; // 通过console输出日志的数量
static u32 console_idx; // console输出的下一条日志位于log_buf的索引
static u64 exclusive_console_stop_seq;
/* the next printk record to read after the last 'clear' command */
static u64 clear_seq;
static u32 clear_idx;
随后通过struct printk_log *msg= log_from_idx(console_idx)
获取到需要输出的日志信息,从而通过console
打印出内容。打印日志信息由console_unlock
函数来完成。
void console_unlock(void)
{
static char ext_text[CONSOLE_EXT_LOG_MAX];
static char text[LOG_LINE_MAX + PREFIX_MAX];
...
for (;;) {
...
msg = log_from_idx(console_idx); // (struct printk_log *)(log_buf + idx)即从log_buf缓冲区获取要输出的日志信息
...
len += msg_print_text(msg,console_msg_format & MSG_FORMAT_SYSLOG,printk_time, text + len, sizeof(text) - len); // 将要输出的日志存储到text
...
console_idx = log_next(console_idx);
console_seq++;
...
call_console_drivers(ext_text, ext_len, text, len); //调用控制台驱动
...
}
...
}
static void call_console_drivers(const char *ext_text, size_t ext_len, const_char *text, size_t len)
{
struct console *con;
trace_console_rcuidle(text, len);
for_each_console(con) {
//遍历以console_drivers为表头的链表,访问每一个已经注册的console,并调用该console中定义的write方法来打印日志信息
...
if (con->flags & CON_EXTENDED)
con->write(con, ext_text, ext_len);
else
con->write(con, text, len); //通用模式下的打印日志信息方法
}
}
可以看到console_unlock
函数会遍历注册的console_drivers
链表,然后调用每一个console
的write
方法将text
中存储的日志打印出来。
既然我们已经了解到printk
函数实际上就是遍历控制台链表console_drivers
,调用console
的write
函数输出日志,那么console
是如何注册的呢?内核提供了register_console
函数进行控制台的注册。
3.1.5 总结
printk
函数主要做两件事情:
- 第一件就是将信息记录到
log_bug
中; - 而第二件事就是调用控制台驱动来将信息输出。
3.2 控制台注册
register_console
函数用于注册控制台,它支持两种类型的控制台:boot console
和real console
,它们有不同的处理方式。可以注册任意数量的boot console
,一旦注册了一个real console
,所有的boot console
将自动取消注册,如果尝试注册boot console
,将被拒绝。
其注册流程:就是遍历console_cmdline
全局数组,如果console_cmdline[i].name
和注册的console
的name
匹配,就将该console
添加到console_drivers
链表,函数定义在kernel/printk/printk.c
。
/*
* The console driver calls this routine during kernel initialization
* to register the console printing procedure with printk() and to
* print any messages that were printed by the kernel before the
* console driver was initialized.
*
* This can happen pretty early during the boot process (because of
* early_printk) - sometimes before setup_arch() completes - be careful
* of what kernel features are used - they may not be initialised yet.
*
* There are two types of consoles - bootconsoles (early_printk) and
* "real" consoles (everything which is not a bootconsole) which are
* handled differently.
* - Any number of bootconsoles can be registered at any time.
* - As soon as a "real" console is registered, all bootconsoles
* will be unregistered automatically.
* - Once a "real" console is registered, any attempt to register a
* bootconsoles will be rejected
*/
void register_console(struct console *newcon)
{
int i;
unsigned long flags;
struct console *bcon = NULL;
struct console_cmdline *c;
static bool has_preferred;
if (console_drivers) // 全局链表,存放注册的console
for_each_console(bcon) // 校验console是否重复注册
if (WARN(bcon == newcon,
"console '%s%d' already registered\n",
bcon->name, bcon->index))
return;
/*
* before we register a new CON_BOOT console, make sure we don't
* already have a valid console
*/
if (console_drivers && newcon->flags & CON_BOOT) { // 注册的console类型判断,带有CON_BOOT标志
/* find the last or real console */
for_each_console(bcon) {
if (!(bcon->flags & CON_BOOT)) { // 查找是否注册过非CON_BOOT类型的控制台,如果注册过了,就退出
pr_info("Too late to register bootconsole %s%d\n",
newcon->name, newcon->index);
return;
}
}
}
if (console_drivers && console_drivers->flags & CON_BOOT)
bcon = console_drivers;
if (!has_preferred || bcon || !console_drivers)
has_preferred = preferred_console >= 0;
/*
* See if we want to use this console driver. If we
* didn't select a console we take the first one
* that registers here.
*/
if (!has_preferred) {
if (newcon->index < 0)
newcon->index = 0;
if (newcon->setup == NULL ||
newcon->setup(newcon, NULL) == 0) {
newcon->flags |= CON_ENABLED;
if (newcon->device) {
newcon->flags |= CON_CONSDEV;
has_preferred = true;
}
}
}
/*
* See if this console matches one we selected on
* the command line.
*/
for (i = 0, c = console_cmdline;
i < MAX_CMDLINECONSOLES && c->name[0]; // 判断bootargs中配置的控制台的名称是否和当前注册的console的名字匹配,如果配置就注册
i++, c++) {
if (!newcon->match ||
newcon->match(newcon, c->name, c->index, c->options) != 0) {
/* default matching */
BUILD_BUG_ON(sizeof(c->name) != sizeof(newcon->name));
if (strcmp(c->name, newcon->name) != 0) // 匹配name
continue;
if (newcon->index >= 0 && // 匹配index
newcon->index != c->index)
continue;
if (newcon->index < 0)
newcon->index = c->index;
if (_braille_register_console(newcon, c))
return;
if (newcon->setup &&
newcon->setup(newcon, c->options) != 0) // 调用其setup函数
break;
}
newcon->flags |= CON_ENABLED;
if (i == preferred_console) {
newcon->flags |= CON_CONSDEV;
has_preferred = true;
}
break;
}
if (!(newcon->flags & CON_ENABLED))
return;
/*
* If we have a bootconsole, and are switching to a real console,
* don't print everything out again, since when the boot console, and
* the real console are the same physical device, it's annoying to
* see the beginning boot messages twice
*/
if (bcon && ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV))
newcon->flags &= ~CON_PRINTBUFFER;
/*
* Put this console in the list - keep the
* preferred driver at the head of the list.
*/
console_lock();
if ((newcon->flags & CON_CONSDEV) || console_drivers == NULL) {
newcon->next = console_drivers;
console_drivers = newcon;
if (newcon->next)
newcon->next->flags &= ~CON_CONSDEV;
} else {
newcon->next = console_drivers->next;
console_drivers->next = newcon;
}
if (newcon->flags & CON_EXTENDED)
nr_ext_console_drivers++;
if (newcon->flags & CON_PRINTBUFFER) {
/*
* console_unlock(); will print out the buffered messages
* for us.
*/
logbuf_lock_irqsave(flags);
console_seq = syslog_seq;
console_idx = syslog_idx;
/*
* We're about to replay the log buffer. Only do this to the
* just-registered console to avoid excessive message spam to
* the already-registered consoles.
*
* Set exclusive_console with disabled interrupts to reduce
* race window with eventual console_flush_on_panic() that
* ignores console_lock.
*/
exclusive_console = newcon;
exclusive_console_stop_seq = console_seq;
logbuf_unlock_irqrestore(flags);
}
console_unlock();
console_sysfs_notify();
/*
* By unregistering the bootconsoles after we enable the real console
* we get the "console xxx enabled" message on all the consoles -
* boot consoles, real consoles, etc - this is to ensure that end
* users know there might be something in the kernel's log buffer that
* went to the bootconsole (that they do not see on the real console)
*/
pr_info("%sconsole [%s%d] enabled\n",
(newcon->flags & CON_BOOT) ? "boot" : "" , // 这里会输出控制台的注册信息
newcon->name, newcon->index);
if (bcon &&
((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) &&
!keep_bootcon) {
/* We need to iterate through all boot consoles, to make
* sure we print everything out, before we unregister them.
*/
for_each_console(bcon)
if (bcon->flags & CON_BOOT)
unregister_console(bcon);
}
}
当控制台注册完成后,会输出控制台的注册信息,比如:
printk: bootconsole [earlycon0] enabled
printk: console [ttySAC0] enabled
3.3 uart console
注册
我们在《linux
驱动移植-UART
设备驱动小》小节中介绍过uart_driver
:
static struct uart_driver s3c24xx_uart_drv = {
.owner = THIS_MODULE,
.driver_name = "s3c2410_serial",
.nr = CONFIG_SERIAL_SAMSUNG_UARTS, // 串口数量定义为4个,实际S3C2440只有3个
.cons = S3C24XX_SERIAL_CONSOLE,
.dev_name = S3C24XX_SERIAL_NAME, // 设备名称ttySAC
.major = S3C24XX_SERIAL_MAJOR, // 主设备号 204
.minor = S3C24XX_SERIAL_MINOR, // 次设备号 64
};
其中cons
成员存储的是控制台,定义如下:
static struct console s3c24xx_serial_console = {
.name = S3C24XX_SERIAL_NAME, // 控制台名称 ttySAC
.device = uart_console_device, // 控制台设备
.flags = CON_PRINTBUFFER, // 标志位
.index = -1, // 索引值
.write = s3c24xx_serial_console_write, // 串口输出
.setup = s3c24xx_serial_console_setup, // 设置串口波特率、发送、接收等功能
.data = &s3c24xx_uart_drv, // 串口驱动uart_driver
};
#define S3C24XX_SERIAL_CONSOLE &s3c24xx_serial_console
控制台s3c24xx_serial_console
的是通过console_initcall
注册到内核的,代码位于drivers/tty/serial/samsung.c
:
static int __init s3c24xx_serial_console_init(void)
{
register_console(&s3c24xx_serial_console);
return 0;
}
console_initcall(s3c24xx_serial_console_init);
在register_console
函数里便会通过s3c24xx_uart_drv
的name
属性(这里是ttySAC
)来匹配console_cmdline[i].name
,当匹配成功,就会将控制台s3c24xx_uart_drv
添加到console_drivers
链表。
那问题又来了,console_cmdline
是什么?在哪里定义和初始化的?我们先来看一下uart
控制台的write
函数,然后再来说console_cmdline
。
3.3.1 s3c24xx_serial_console_write
通过console_initcall
我们注册了s3c24xx_serial_console
,其write
函数为s3c24xx_serial_console_write
,该函数实际上就是通过对硬件寄存器配置,从而实现数据的发送。
函数定义在drivers/tty/serial/samsung.c
:
static int
s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon)
{
struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port);
unsigned long ufstat, utrstat;
if (ufcon & S3C2410_UFCON_FIFOMODE) {
/* fifo mode - check amount of data in fifo registers... */
ufstat = rd_regl(port, S3C2410_UFSTAT);
return (ufstat & info->tx_fifofull) ? 0 : 1;
}
/* in non-fifo mode, we go and use the tx buffer empty */
utrstat = rd_regl(port, S3C2410_UTRSTAT);
return (utrstat & S3C2410_UTRSTAT_TXE) ? 1 : 0;
}
static bool
s3c24xx_port_configured(unsigned int ucon)
{
/* consider the serial port configured if the tx/rx mode set */
return (ucon & 0xf) != 0;
}
static void
s3c24xx_serial_console_putchar(struct uart_port *port, int ch)
{
unsigned int ufcon = rd_regl(port, S3C2410_UFCON);
while (!s3c24xx_serial_console_txrdy(port, ufcon))
cpu_relax();
wr_regb(port, S3C2410_UTXH, ch); // UTXH UART发送缓冲区寄存器
}
static void
s3c24xx_serial_console_write(struct console *co, const char *s,
unsigned int count)
{
unsigned int ucon = rd_regl(cons_uart, S3C2410_UCON);
/* not possible to xmit on unconfigured port */
if (!s3c24xx_port_configured(ucon))
return;
uart_console_write(cons_uart, s, count, s3c24xx_serial_console_putchar);
}
3.4 console_cmdline
我们定位到kernel/printk/printk.c
文件以下代码:
_setup("console=", console_setup);
其中_setup
宏的作用就是:若uboot
传递进来的bootargs
字符包含console=
,就调用console_setup
函数,并对console=
后面的字符串ttySAC0,115200
进行解析。
需要注意的是:console_setup
函数的执行优先级高于s3c24xx_serial_console_init
。
3.4.1 console_setup
console_setup
函数定义如下:
/*
* Set up a console. Called via do_early_param() in init/main.c
* for each "console=" parameter in the boot command line.
*/
static int __init console_setup(char *str) // "ttySAC0,115200"
{
char buf[sizeof(console_cmdline[0].name) + 4]; /* 4 for "ttyS" 声明一个字符数组,长度为20 */
char *s, *options, *brl_options = NULL;
int idx;
if (_braille_console_setup(&str, &brl_options))
return 1;
/*
* Decode str into name, index, options.
*/
if (str[0] >= '0' && str[0] <= '9') { // 首字符是数字,则将其驱动名设置为ttySn
strcpy(buf, "ttyS");
strncpy(buf + 4, str, sizeof(buf) - 5);
} else {
strncpy(buf, str, sizeof(buf) - 1); // 直接拷贝 buf="ttySAC0,115200"
}
buf[sizeof(buf) - 1] = 0;
options = strchr(str, ','); // 返回第一个,字符位置 此时options=",115200"
if (options)
*(options++) = 0; // options="115200" str="ttySAC0"
#ifdef __sparc__
if (!strcmp(str, "ttya"))
strcpy(buf, "ttyS0");
if (!strcmp(str, "ttyb"))
strcpy(buf, "ttyS1");
#endif
for (s = buf; *s; s++)
if (isdigit(*s) || *s == ',')
break; // s = ",115200"
idx = simple_strtoul(s, NULL, 10); // 执行完 idx=0 s="0,115200"
*s = 0; // 将'0'修改为0 buf="ttySAC"
__add_preferred_console(buf, idx, options, brl_options);
console_set_on_cmdline = 1;
return 1;
}
函数中console_cmdline
是一个全局数组,数组长度为8,用来存放控制台的信息:
/*
* Array of consoles built from command line options (console=)
*/
#define MAX_CMDLINECONSOLES 8
static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
上面的代码最终调用__add_preferred_console("ttySAC", 0, "115200",...)
将bootargs
中传进来的控制台信息添加到console_cmdline
全局数组。
补充:console_cmdline
类型定义如下:
struct console_cmdline
{
char name[16]; /* Name of the driver 驱动名称 */
int index; /* Minor dev. to use 次设备号 */
char *options; /* Options for the driver 选项 */
#ifdef CONFIG_A11Y_BRAILLE_CONSOLE
char *brl_options; /* Options for braille driver */
#endif
};
3.4.2 __add_preferred_console
__add_preferred_console
函数定义如下,该函数将控制台信息添加到console_cmdline
全局数组,该数组及全局preferred_console
,在register_console中
会使用到。
static int __add_preferred_console(char *name, int idx, char *options,
char *brl_options)
{
struct console_cmdline *c;
int i;
/*
* See if this tty is not yet registered, and
* if we have a slot free.
*/
for (i = 0, c = console_cmdline;
i < MAX_CMDLINECONSOLES && c->name[0]; // MAX_CMDLINECONSOLES为8,表示最多添加8个控制台 判断要添加的控制台信息在console_cmdline数组是否已经存在
i++, c++) {
if (strcmp(c->name, name) == 0 && c->index == idx) { // 比较名称和索引
if (!brl_options)
preferred_console = i; //设置全局selected_console索引号
return 0;
}
}
if (i == MAX_CMDLINECONSOLES) //判断console_cmdline数组是否满了
return -E2BIG;
if (!brl_options)
preferred_console = i;
strlcpy(c->name, name, sizeof(c->name)); // 添加控制台信息到console_cmdline数组第i个元素中
c->options = options;
braille_set_options(c, brl_options);
c->index = idx;
return 0;
}
3.5 early_console
注册
我们已经知道printk
函数打印日志信息是通过console
的的write
方法实现的,那么不知道你有没有想过一个问题,在linux
内核启动的过程中, 我们一直能看到串口输出的启动信息,仔细思考一下,在linux
系统还未注册串口控制台s3c24xx_serial_console_init
之前这些日志信息是如何打印出来。
如果通过make menuconfig
配置了CONFIG_EARLY_PRINTK
(需要注意的是在arm64
已经没有实现early_printk
了):
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
在控制台s3c24xx_serial_console
注册之前,内核会通过register_console
注册一个名字为earlycon
的控制台early_console_dev
,我们来看一下early_console_dev
到底是什么,它是如何注册到内核的。
early_console_dev
相关代码定义在arch/arm/kernel/early_printk.c
文件中:
include <linux/kernel.h>
#include <linux/console.h>
#include <linux/init.h>
#include <linux/string.h>
extern void printascii(const char *);
static void early_write(const char *s, unsigned n)
{
char buf[128];
while (n) {
unsigned l = min(n, sizeof(buf)-1);
memcpy(buf, s, l); // 一次最多拷贝128个字节到buf
buf[l] = 0;
s += l;
n -= l;
printascii(buf); // 一次最多发送128个字节
}
}
static void early_console_write(struct console *con, const char *s, unsigned n)
{
early_write(s, n);
}
static struct console early_console_dev = { // 此处定义了一个console设备
.name = "earlycon",
.write = early_console_write, // 内核早期输出的信息都是通过该函数实现的
.flags = CON_PRINTBUFFER | CON_BOOT,
.index = -1,
};
static int __init setup_early_printk(char *buf) // earlycon初始化入口
{
early_console = &early_console_dev;
register_console(&early_console_dev); // 注册early_console_dev
return 0;
}
early_param("earlyprintk", setup_early_printk);
CON_PRINTBUFFER
标识,表示注册这个console
的时候,需要把内核缓冲区__log_buf
中的日志通过这个console
进行输出。
CON_BOOT
标识,表示这是一个boot console
,当启动过程了注册其它非boot console
的时候,将会卸载掉这个console
。
可以看到只要调用了setup_early_printk
函数,就可以实现控制台early_console_dev
的注册。
3.5.1 early_para
我们看一下最后一行代码,early_param
是一个宏,定义在include/linux/init.h
:
/*
* Only for really core code. See moduleparam.h for the normal way.
*
* Force the alignment so the compiler doesn't space elements of the
* obs_kernel_param "array" too far apart in .init.setup.
*/
#define __setup_param(str, unique_id, fn, early) \
static const char __setup_str_##unique_id[] __initconst \
__aligned(1) = str; \
static struct obs_kernel_param __setup_##unique_id \
__used __section(.init.setup) \
__attribute__((aligned((sizeof(long))))) \
= { __setup_str_##unique_id, fn, early }
#define __setup(str, fn) \
__setup_param(str, fn, fn, 0)
/*
* NOTE: fn is as per module_param, not __setup!
* Emits warning if fn returns non-zero.
*/
#define early_param(str, fn) \
__setup_param(str, fn, fn, 1)
展开如下,定义一个变量,和一个结构体变量。结构体变量,放在了.init.setup
段中;
static const char __setup_str_setup_early_printk[] __initconst \
__aligned(1) = "earlyprintk"; \
static struct obs_kernel_param __setup_setup_early_printk \
__used __section(.init.setup) \
__attribute__((aligned((sizeof(long))))) \
= {"earlyprintk", setup_early_printk, 1 }
struct obs_kernel_param
定义如下:
struct obs_kernel_param {
const char *str; // 设置为了"earlyprintk"
int (*setup_func)(char *); // 设置为了setup_early_printk
int early; // 设置为了1
};
在init/main.c
文件中,通过uboot
传递给内核的bootargs
参数,进行early
初始化。
start_kernel() // init/main.c 内核启动函数
pr_notice("%s", linux_banner);
setup_arch(&command_line); // arch/arm/kernel/setup.c
parse_early_param(); // init/main.c
pr_notice
用于输出当前内核banner
信息,该打印输出位于early print
之前,且能正常的打出内核的banner
:
Linux version 5.2.8 (root@zhengyang) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #11 Mon Apr 24 22:09:14 CST 2023
这主要是因为日志信息被寄存到了缓存区__log_buf
中,等early print
初始化完成后再从缓冲区输出来。
3.5.2 parse_early_param
parse_early_param
定义在init/main.c
文件:
/* Arch code calls this early on, or if not, just before other parsing. */
void __init parse_early_param(void)
{
static int done __initdata;
static char tmp_cmdline[COMMAND_LINE_SIZE] __initdata;
if (done)
return;
/* All fall through to do_early_param. */
strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE); // boot_command_line中保存的就是bootargs参数
parse_early_options(tmp_cmdline);
done = 1;
}
通过parse_early_options
函数,分析cmdline
,也就是bootargs
参数,比如Mini2440
将该参数设置为root=/dev/mtdblock3 console=ttySAC0,115200 init=/linuxrc earlyprintk
;
void __init parse_early_options(char *cmdline)
{
parse_args("early options", cmdline, NULL, 0, 0, 0, NULL,
do_early_param);
}
这里通过统一的parse_args
函数处理,函数原型如下:
int parse_args(const char *name, char *args, const struct kernel_param *params, unsigned num, int (*unknown)(char *param, char *val))
这个函数的处理方法主要是分离出每个类似console=ttySAC0,115200
的形式,再给next_arg
分离出参数名和参数值,并通过参数名在params
指向的地址中搜索对应的数据结构,并调用其参数处理函数。
如果没有找到就调用最后一个参数unknown
传递进来的未知参数处理函数。由于此处params
为NULL
,必然找不到对应的数据结构,所有分离好的参数及参数名都由最后一个函数指针参数指定的函数do_early_param
来处理。
因此,我们的bootargs
参数:
root=/dev/mtdblock3 console=ttySAC0,115200 init=/linuxrc earlyprintk
将会被分成多个key-value
对,并多次调用do_early_param
函数进行处理。
root=/dev/mtdblock3
console=ttySAC0,115200
init=/linuxrc
earlyprintk
其中key
传递给给do_early_param
函数的param
参数,value
传递给do_early_param
函数的val
参数。
3.5.3 do_early_param
``do_early_param函数定义在
init/main.c`:
/* Check for early params. */
static int __init do_early_param(char *param, char *val,
const char *unused, void *arg)
{
const struct obs_kernel_param *p;
for (p = __setup_start; p < __setup_end; p++) { // 实际上就是遍历通过early_param宏注册的struct obs_kernel_param类型的数据
if ((p->early && parameq(param, p->str)) || // __setup_setup_early_printk的成员early为1,str为earlyprintk
(strcmp(param, "console") == 0 &&
strcmp(p->str, "earlycon") == 0)
) {
if (p->setup_func(val) != 0)
pr_warn("Malformed early option '%s'\n", param);
}
}
/* We accept everything at this stage. */
return 0;
}
这里的__setup_start
、__setup_end
,是链接脚本中的变量,定义在arch/arm/kernel/vmlinux.lds
,内容如下:
__setup_start = .; KEEP(*(.init.setup)) __setup_end = .;
__setup_start
变量是段.init.setup
的起始地址,__setup_end
是.init.setup
段的结束地址。
do_early_param
函数的for
循环中,从.init.setup
段中,依次将struct obs_kernel_param
结构体变量取出来,有两种情况会执行该结构体的setup_func
函数。
如果成员early = 1
并且bootargs
中存在该结构体的str
字符串;
如果该结构体的str
为earlycon
(即early_param
宏第一个参数为earlycon
),并且bootargs
中有console
关键字;
在前面,__setup_setup_early_printk
变量是定义在.init.setup
段。由于bootargs
传递了earlyprintk
参数,与__setup_setup_early_printk.str
匹配,因此这里将会执行setup_early_printk
函数,该函数会注册控制台early_console_dev
。
3.5.4 printascii
控制台early_console_dev
,其write
函数为early_console_write
,该函数内部调用了early_write
,而early_write
又调用了printascii
函数进行串口数据的输出。
printascii
函数函数定义在arch/arm/kernel/debug.S
:
ENTRY(printascii)
addruart_current r3, r1, r2
1: teq r0, #0
ldrbne r1, [r0], #1
teqne r1, #0
reteq lr
2: teq r1, #'\n'
bne 3f
mov r1, #'\r'
waituart r2, r3
senduart r1, r3
busyuart r2, r3
mov r1, #'\n'
3: waituart r2, r3
senduart r1, r3
busyuart r2, r3
b 1b
ENDPROC(printascii)
ENTRY(printch)
addruart_current r3, r1, r2
mov r1, r0
mov r0, #0
b 2b
ENDPROC(printch)
addruart_current
、waituart
、senduart
、busyuart
就是往寄存器赋值控制了。
注意:直接往寄存器写值实现串口打印,是基于我们在uboot
中已经把串口初始化过了。
addruart_current
和 addruart
都是宏定义,各个平台实现自己的 addruart
宏。
addruart_current
定义在arch/arm/kernel/debug.S
:
#ifdef CONFIG_MMU
.macro addruart_current, rx, tmp1, tmp2
addruart \tmp1, \tmp2, \rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1
moveq \rx, \tmp1
movne \rx, \tmp2
.endm
#else /* !CONFIG_MMU */
.macro addruart_current, rx, tmp1, tmp2
addruart \rx, \tmp1, \tmp2
.endm
#endif /* CONFIG_MMU */
addruart
定义在arch/arm/include/debug/s3c24xx.S
文件:
#include <linux/serial_s3c.h>
.macro addruart, rp, rv, tmp
ldr \rp, = CONFIG_DEBUG_UART_PHYS // 0x50004000
ldr \rv, = CONFIG_DEBUG_UART_VIRT // 0xf7004000
.endm
作用是将串口寄存器基地址的虚拟地址和物理地址传递给寄存器r1
、r3
,
3.6 总结
综上分析,可知当执行printk
函数时:
- 首先会将所要输出的信息寄存到日志缓冲区;
- 随后遍历所有的控制台,检查其是否满足当前要求,如果满足,则调用该控制台所指定的
write
函数,从而打印信息;
所以,关于内核启动时的日志打印,也需要在注册某个console
之后,再次调用printk
函数来进行日志的输出。
因此,内核在启动阶段首先注册了用于启动阶段的console
,即early_console
。随后,又初始化了内核启动之后的console
,即s3c24xx_serial_console
。与此同时,将前面注册的early_console
进行了注销。
参考文章
[1] 34.Linux-printk
分析、使用__FILE__
, __FUNCTION__
,__LINE__
调试
[2] Linux
内核之printk
打印(转)
[3] 内核printk
原理介绍
[4] How to get printk format specifiers right
[7] printk
函数分析