"Das U-Boot" Source Tree
at master 49 lines 1.6 kB view raw
1.. SPDX-License-Identifier: GPL-2.0-or-later 2 3Memory Management 4----------------- 5 6.. note:: 7 8 This information is outdated and needs to be updated. 9 10U-Boot runs in system state and uses physical addresses, i.e. the 11MMU is not used either for address mapping nor for memory protection. 12 13The available memory is mapped to fixed addresses using the 14memory-controller. In this process, a contiguous block is formed for each 15memory type (Flash, SDRAM, SRAM), even when it consists of several 16physical-memory banks. 17 18U-Boot is installed in XIP flash memory, or may be loaded into a lower region of 19RAM by a secondary program loader (SPL). After 20booting and sizing and initialising DRAM, the code relocates itself 21to the upper end of DRAM. Immediately below the U-Boot code some 22memory is reserved for use by malloc() [see CONFIG_SYS_MALLOC_LEN 23configuration setting]. Below that, a structure with global Board-Info 24data is placed, followed by the stack (growing downward). 25 26Additionally, some exception handler code may be copied to the low 8 kB 27of DRAM (0x00000000 ... 0x00001fff). 28 29So a typical memory configuration with 16 MB of DRAM could look like 30this:: 31 32 0x0000 0000 Exception Vector code 33 : 34 0x0000 1fff 35 0x0000 2000 Free for Application Use 36 : 37 : 38 39 : 40 : 41 0x00fb ff20 Monitor Stack (Growing downward) 42 0x00fb ffac Board Info Data and permanent copy of global data 43 0x00fc 0000 Malloc Arena 44 : 45 0x00fd ffff 46 0x00fe 0000 RAM Copy of Monitor Code 47 ... eventually: LCD or video framebuffer 48 ... eventually: pRAM (Protected RAM - unchanged by reset) 49 0x00ff ffff [End of RAM]