当前位置:网站首页>u-boot ERROR: Failed to allocate 0x5c6f bytes below 0x17ffffff.Failed using fdt_high value
u-boot ERROR: Failed to allocate 0x5c6f bytes below 0x17ffffff.Failed using fdt_high value
2022-08-10 06:12:00 【IT张先生】
## Loading kernel from FIT Image at 08000000 ...
Using '[email protected]' configuration
Verifying Hash Integrity ... OK
Trying '[email protected]' kernel subimage
Description: Linux kernel
Created: 2022-08-06 10:42:14 UTC
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x080001e8
Data Size: 4049224 Bytes = 3.9 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: crc32
Hash value: 5716757b
Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 08000000 ...
Using '[email protected]' configuration
Trying '[email protected]' fdt subimage
Description: 775E device tree
Created: 2022-08-06 10:42:14 UTC
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x083fd9fc
Data Size: 11375 Bytes = 11.1 KiB
Architecture: ARM
Hash algo: crc32
Hash value: 2eda7b23
Verifying Hash Integrity ... crc32+ OK
Booting using the fdt blob at 0x83fd9fc
Uncompressing Kernel Image ... OK
ERROR: Failed to allocate 0x5c6f bytes below 0x17ffffff.
Failed using fdt_high value for Device TreeFDT creation failed! hanging...### ERROR ### Please RESET the board ###
解决办法:
通过搜索错误代码,定位到时u-boot的lbm模块出了问题:
lbm:Logical memory blocks.
lbm使用全局的gd->bd->bi_dram[0].start和gd->bd->bi_dram[0].size作为自己内存池管理
common/board_f.c
static int setup_dram_config(void)
{
/* Ram is board specific, so move it to board code ... */
dram_init_banksize();
return 0;
}
board/platform/board.c 中增加如下代码:
void dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = PHYS_SDRAM_1_BASE;
gd->bd->bi_dram[0].size = gd->ram_size;
}
common/bootm.c
#ifdef CONFIG_LMB
static void boot_start_lmb(bootm_headers_t *images)
{
ulong mem_start;
phys_size_t mem_size;
lmb_init(&images->lmb);
mem_start = getenv_bootm_low();
mem_size = getenv_bootm_size();
lmb_add(&images->lmb, (phys_addr_t)mem_start, mem_size);
arch_lmb_reserve(&images->lmb);
board_lmb_reserve(&images->lmb);
}
#else
#define lmb_reserve(lmb, base, size)
static inline void boot_start_lmb(bootm_headers_t *images) {
}
#endif
u-boot/arch/arm/lib/bootm.c
void arch_lmb_reserve(struct lmb *lmb)
{
ulong sp;
/* * Booting a (Linux) kernel image * * Allocate space for command line and board info - the * address should be as high as possible within the reach of * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused * memory, which means far enough below the current stack * pointer. */
sp = get_sp();
debug("## Current stack ends at 0x%08lx ", sp);
/* adjust sp by 4K to be safe */
sp -= 4096;
lmb_reserve(lmb, sp,
gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size - sp);
}
边栏推荐
猜你喜欢
随机推荐
基于ABP的AppUser对象扩展
深入理解数组
Confluence可以连接数据库但是在下一步就报错了
如何在VMlogin中设置YiLu代理?
机器学习_LGB调参汇总(开箱即食)
MySQL之InnoDB引擎(六)
3. Transactions [mysql advanced]
2022河南萌新联赛第(五)场:信息工程大学 F - 分割草坪
共享静态IP与独享静态ip有何区别
不同场景如何使用动态代理?
语法基础(判断语句)
mysql之两阶段提交
Make a boot floppy and boot with bochs emulator
什么是MQTT网关?与传统DTU有哪些区别?
2022 Henan Mengxin League (fifth) game: University of Information Engineering H - Xiao Ming drinking milk tea
裸辞—躺平—刷题—大厂(Android面试的几大技巧)
直接跳转与间接跳转
[Reinforcement Learning] "Easy RL" - Q-learning - CliffWalking (cliff walking) code interpretation
求职
tqdm高级使用方法(类keras进度条)
![[网络安全]实操AWVS靶场复现CSRF漏洞](/img/7f/f08e429e3d8ede03a1c1754e256f99.png)








