Boot Loader
-
_mainBoot Loader/U-BOOT 2019. 9. 25. 14:08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ENTRY(_main) /* * Set up initial C runtime environment and call board_init_f(0). */ #if defined(CO..
-
static const init_fnc_t init_sequence_f[]Boot Loader/U-BOOT 2019. 9. 25. 13:56
/common/board_f.c 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 ..
-
int initcall_run_list(const init_fnc_t init_sequence[])Boot Loader/U-BOOT 2019. 9. 25. 13:53
/lib/initcall.c 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 int initcall_run_list(const init_fnc_t init_sequence[]) { const init_fnc_t *init_fnc_ptr; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { unsigned long reloc_ofs = 0; int ret; if (gd->flags & GD_FLG_RELOC) reloc_ofs = gd->reloc_off; #ifdef CONFIG_EFI_APP reloc_ofs = (unsigned long)image..
-
void board_init_f(ulong boot_flags)Boot Loader/U-BOOT 2019. 9. 25. 13:49
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 void board_init_f(ulong boot_flags) { #ifdef CONFIG_SYS_GENERIC_GLOBAL_DATA /* * For some architectures, global data is initialized and used before * calling this function. The data should be preserved. For others, * CONFIG_SYS_GENERIC_GLOBAL_DATA should be defined and use the stack * here to host global da..
-
ulong board_init_f_alloc_reserve(ulong top)Boot Loader/U-BOOT 2019. 9. 25. 00:24
1 2 3 4 5 6 7 8 9 10 ulong board_init_f_alloc_reserve(ulong top) { /* Reserve early malloc arena */ #if defined(CONFIG_SYS_MALLOC_F) top -= CONFIG_SYS_MALLOC_F_LEN; #endif /* LAST : reserve GD (rounded up to a multiple of 16 bytes) */ top = rounddown(top-sizeof(struct global_data), 16); return top; } Colored by Color Scripter cs 50라인이 실행되면서 top은 0x43E00000-0x00000400 = 0x43DFFC00이다 malloc 영역과 gl..
-
/common/init/board_init.cBoot Loader/U-BOOT 2019. 9. 25. 00:15
CONFIG_SYS_MALLOC_F=y CONFIG_SYS_MALLOC_F_LEN=0x400 이라고 /configs/odroid-xu4_defconfig에 정의되어있다. ulong board_init_f_alloc_reserve(ulong top)의 50라인이 실행되면서 top은 0x43E00000-0x00000400 = 0x43DFFC00이다 malloc 영역과 global_data영역을 지정해주는것 같다. void board_init_f_init_reserve(ulong base)에서 매개변수로 들어온 top어드레스 영역에 '\0'로 초기화 해준다. __weak void arch_setup_gd(struct global_data *gd_ptr) top어드레스를 gd변수에 넣어준다. 다시 global_..