.
common/board\_f.c
1 static int setup_dest_addr(void)
2 {
3 debug("Monitor len: %08lX\n", gd->mon_len);
4 /*
5 * Ram is setup, size stored in gd !!
6 */
7 debug("Ram size: %08lX\n", (ulong)gd->ram_size);
8 #ifdef CONFIG_SYS_MEM_RESERVE_SECURE
9 /* Reserve memory for secure MMU tables, and/or security monitor */
10 gd->ram_size -= CONFIG_SYS_MEM_RESERVE_SECURE;
11 /*
12 * Record secure memory location. Need recalcuate if memory splits
13 * into banks, or the ram base is not zero.
14 */
15 gd->arch.secure_ram = gd->ram_size;
16 #endif
17 /*
18 * Subtract specified amount of memory to hide so that it won't
19 * get "touched" at all by U-Boot. By fixing up gd->ram_size
20 * the Linux kernel should now get passed the now "corrected"
21 * memory size and won't touch it either. This has been used
22 * by arch/powerpc exclusively. Now ARMv8 takes advantage of
23 * thie mechanism. If memory is split into banks, addresses
24 * need to be calculated.
25 */
26 gd->ram_size = board_reserve_ram_top(gd->ram_size);
27
28 #ifdef CONFIG_SYS_SDRAM_BASE
29 gd->ram_top = CONFIG_SYS_SDRAM_BASE;
30 #endif
31 gd->ram_top += get_effective_memsize();
32 gd->ram_top = board_get_usable_ram_top(gd->mon_len);
33 gd->relocaddr = gd->ram_top;
34 debug("Ram top: %08lX\n", (ulong)gd->ram_top);
35 #if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500))
36 /*
37 * We need to make sure the location we intend to put secondary core
38 * boot code is reserved and not used by any part of u-boot
39 */
40 if (gd->relocaddr > determine_mp_bootpg(NULL)) {
41 gd->relocaddr = determine_mp_bootpg(NULL);
42 debug("Reserving MP boot page to %08lx\n", gd->relocaddr);
43 }
44 #endif
45 return 0;
46 }
- 8번 줄의
CONFIG_SYS_MEM_RESERVE_SECURE
은 정의되어 있지 않아 if문은 수행되지 않습니다. - 28번 줄의
CONFIG_SYS_SDRAM_BASE
은0x00000000
로 정의되어 있어 if문이 수행됩니다. - 35번 줄의 if문은 수행되지 않습니다.