uboot下init_sequence_f函数之reserve_malloc

来源:互联网 发布:.net core 2.0 数据库 编辑:程序博客网 时间:2024/06/09 18:32
 
#ifndef CONFIG_SPL_BUILD reserve_malloc, reserve_board,#endif
 

static int reserve_malloc(void){ gd->start_addr_sp = gd->start_addr_sp - TOTAL_MALLOC_LEN; debug("Reserving %dk for malloc() at: %08lx\n",   TOTAL_MALLOC_LEN >> 10, gd->start_addr_sp); return 0;}

/* (permanently) allocate a Board Info struct */static int reserve_board(void){ if (!gd->bd) {  gd->start_addr_sp -= sizeof(bd_t);  gd->bd = (bd_t *)map_sysmem(gd->start_addr_sp, sizeof(bd_t));  memset(gd->bd, '\0', sizeof(bd_t));  debug("Reserving %zu Bytes for Board Info at: %08lx\n",        sizeof(bd_t), gd->start_addr_sp); } return 0;}

0 0
原创粉丝点击