当前位置:网站首页>u-boot调试定位手段
u-boot调试定位手段
2022-08-05 04:48:00 【IT张先生】
开启调试信息参考
https://blog.csdn.net/zwjzwj108108/article/details/126147584
调试显示下面的信息
initcall: 040152e4
initcall: 04068584
initcall: 0401e9a8
initcall: 04015344
initcall: 04001510
initcall: 04015304
initcall: 0401552c
malloc_simple: size=18, ptr=18, limit=400: ffff0b30
malloc_simple: size=54, ptr=6c, limit=400: ffff0b48
malloc_simple: size=4, ptr=70, limit=400: ffff0b9c
uclass_find_device_by_seq: 0 -1
uclass_find_device_by_seq: 0 0
- -1 -1
- not found
malloc_simple: size=18, ptr=88, limit=400: ffff0ba0
malloc_simple: size=54, ptr=dc, limit=400: ffff0bb8
Bound device mod_exp_sw to root_driver
initcall: 04015354
initcall: 04015518
initcall: 04001478
initcall: 040177ec
initcall: 040154ec
initcall: 040445c0 //该值是一个符号地址,通过u-boot.map可以查看到具体符号
malloc_simple: size=18, ptr=f4, limit=400: ffff0c0c
bind node [email protected]
- attempt to match compatible string 'xlnx,xuartps'
- found match at 'serial_zynq'
malloc_simple: size=54, ptr=148, limit=400: ffff0c24
Looking for 'serial' at 2876, name [email protected]
- serial0, /amba/[email protected]
Found seq 0
Bound device [email protected] to root_driver
malloc_simple: size=4, ptr=14c, limit=400: ffff0c78
malloc_simple: size=4, ptr=150, limit=400: ffff0c7c
uclass_find_device_by_seq: 0 0
- 0 -1
- not found
OF: ** translation for device [email protected] **
OF: bus is default (na=1, ns=1) on amba
OF: translating address: 001000e0
OF: parent bus is default (na=1, ns=1) on
OF: no ranges, 1:1 translation
OF: parent translation for: 00000000
OF: with offset: 3758100480
OF: one level translation: 001000e0
OF: reached root nodeclk_get_by_index(dev=ffff0c24, index=0, clk=ffff0990)
fdtdec_get_int: #clock-cells: 0x1 (1)
malloc_simple: size=18, ptr=168, limit=400: ffff0c80
clk_get_by_index: uclass_get_device_by_of_offset failed: err=-19
failed to get clock
uclass_find_device_by_seq: 0 0
- 0 -1
- not found
uclass_find_device_by_seq: 1 0
- 0 -1
- found
malloc_simple: size=4, ptr=16c, limit=400: ffff0c98
malloc_simple: size=4, ptr=170, limit=400: ffff0c9c
uclass_find_device_by_seq: 0 0
- 0 -1
- not found
OF: ** translation for device [email protected] **
OF: bus is default (na=1, ns=1) on amba
OF: translating address: 001000e0
OF: parent bus is default (na=1, ns=1) on
OF: no ranges, 1:1 translation
OF: parent translation for: 00000000
OF: with offset: 3758100480
OF: one level translation: 001000e0
OF: reached root nodeclk_get_by_index(dev=ffff0c24, index=0, clk=ffff0968)
fdtdec_get_int: #clock-cells: 0x1 (1)
clk_get_by_index: uclass_get_device_by_of_offset failed: err=-19
failed to get clock
malloc_simple: size=4, ptr=174, limit=400: ffff0ca0
malloc_simple: size=4, ptr=178, limit=400: ffff0ca4
uclass_find_device_by_seq: 0 0
- 0 -1
- not found
OF: ** translation for device [email protected] **
OF: bus is default (na=1, ns=1) on amba
OF: translating address: 001000e0
OF: parent bus is default (na=1, ns=1) on
OF: no ranges, 1:1 translation
OF: parent translation for: 00000000
OF: with offset: 3758100480
OF: one level translation: 001000e0
OF: reached root nodeclk_get_by_index(dev=ffff0c24, index=0, clk=ffff0970)
fdtdec_get_int: #clock-cells: 0x1 (1)
clk_get_by_index: uclass_get_device_by_of_offset failed: err=-19
failed to get clock
malloc_simple: size=4, ptr=17c, limit=400: ffff0ca8
malloc_simple: size=4, ptr=180, limit=400: ffff0cac
uclass_find_device_by_seq: 0 0
- 0 -1
- not found
OF: ** translation for device [email protected] **
OF: bus is default (na=1, ns=1) on amba
OF: translating address: 001000e0
OF: parent bus is default (na=1, ns=1) on
OF: no ranges, 1:1 translation
OF: parent translation for: 00000000
OF: with offset: 3758100480
OF: one level translation: 001000e0
OF: reached root nodeclk_get_by_index(dev=ffff0c24, index=0, clk=ffff0970)
fdtdec_get_int: #clock-cells: 0x1 (1)
clk_get_by_index: uclass_get_device_by_of_offset failed: err=-19
failed to get clock
No serial driver found
resetting ...
Error, wrong i2c adapter 0 max 0 possible
Error, wrong i2c adapter 0 max 0 possible
itcall: 040445c0 //该值是一个符号地址,通过u-boot.map可以查看到具体符号。所以可以定位到再函数中出现了问题。
显示的错误信息:查看serial_init函数,可以看到是和串口相关。
OF: ** translation for device [email protected] **
OF: bus is default (na=1, ns=1) on amba
OF: translating address: 001000e0
OF: parent bus is default (na=1, ns=1) on
OF: no ranges, 1:1 translation
OF: parent translation for: 00000000
OF: with offset: 3758100480
OF: one level translation: 001000e0
OF: reached root nodeclk_get_by_index(dev=ffff0c24, index=0, clk=ffff0990)
fdtdec_get_int: #clock-cells: 0x1 (1)
malloc_simple: size=18, ptr=168, limit=400: ffff0c80
clk_get_by_index: uclass_get_device_by_of_offset failed: err=-19
failed to get clock
最后定位到serial_zynq.c文件中的打印。在获取时钟的时候出现问题。
int zynq_serial_setbrg(struct udevice *dev, int baudrate)
{
struct zynq_uart_priv *priv = dev_get_priv(dev);
unsigned long clock;
#if defined(CONFIG_CLK) || defined(CONFIG_SPL_CLK)
int ret;
struct clk clk;
ret = clk_get_by_index(dev, 0, &clk);
if (ret < 0) {
dev_err(dev, "failed to get clock\n");
return ret;
}
clock = clk_get_rate(&clk);
if (IS_ERR_VALUE(clock)) {
dev_err(dev, "failed to get rate\n");
return clock;
}
debug("%s: CLK %ld\n", __func__, clock);
ret = clk_enable(&clk);
if (ret && ret != -ENOSYS) {
dev_err(dev, "failed to enable clock\n");
return ret;
}
#else
clock = get_uart_clk(0);
#endif
_uart_zynq_serial_setbrg(priv->regs, clock, baudrate);
return 0;
}
边栏推荐
- Talk about 20 common problems in data governance
- overloaded operator
- 如何解决复杂的分销分账问题?
- How to deal with DNS hijacking?
- 【学习笔记之菜Dog学C】动态内存管理之经典笔试题
- The solution to the failure to read channel information when dedecms generates a message in the background
- 四位数显表头设计
- 使用IDEA连接TDengine服务器
- 将故事写成我们
- 【8.3】代码源 - 【喵 ~ 喵 ~ 喵~】【树】【与】
猜你喜欢
4T硬盘剩余很多提示“No space left on device“磁盘空间不足
不看后悔,appium自动化环境完美搭建
开发属于自己的node包
Detailed explanation of each module of ansible
[8.1] Code Source - [The Second Largest Number Sum] [Stone Game III] [Balanced Binary Tree]
[Geek Challenge 2019]FinalSQL
大学物理---质点运动学
基于Web的商城后台管理系统的设计与实现
Mysql的undo log详解
35岁的软件测试工程师,月薪不足2W,辞职又怕找不到工作,该何去何从?
随机推荐
【软考 系统架构设计师】软件架构设计③ 特定领域软件架构(DSSA)
Shell(4)条件控制语句
Four-digit display header design
Bytebuffer put flip compact clear method demonstration
How to wrap markdown - md file
The first performance test practice, there are "100 million" a little nervous
What is ASEMI photovoltaic diode, the role of photovoltaic diode
什么是ASEMI光伏二极管,光伏二极管的作用
雷克萨斯lm的安全性到底体现在哪里?一起来看看吧
8.04 Day35-----MVC three-tier architecture
概率论的学习和整理8: 几何分布和超几何分布
Talk about 20 common problems in data governance
第一次性能测试实践,有“亿”点点紧张
Machine Learning Overview
【8.3】代码源 - 【喵 ~ 喵 ~ 喵~】【树】【与】
Detailed explanation of each module of ansible
Application status of digital twin technology in power system
Detailed explanation of Mysql's undo log
write the story about us
DEJA_VU3D - Cesium功能集 之 056-智图Arcgis地图纠偏