Merge branch 'microblaze' of git://git.denx.de/u-boot-microblaze
This commit is contained in:
@@ -106,62 +106,22 @@
|
||||
# define CONFIG_XILINX_TB_WATCHDOG
|
||||
#endif
|
||||
|
||||
/*
|
||||
* memory layout - Example
|
||||
* CONFIG_SYS_TEXT_BASE = 0x1200_0000; defined in config.mk
|
||||
* CONFIG_SYS_SRAM_BASE = 0x1000_0000;
|
||||
* CONFIG_SYS_SRAM_SIZE = 0x0400_0000; 64MB
|
||||
*
|
||||
* CONFIG_SYS_MONITOR_LEN = 0x40000
|
||||
* CONFIG_SYS_MALLOC_LEN = 3 * CONFIG_SYS_MONITOR_LEN = 0xC0000
|
||||
*
|
||||
* CONFIG_SYS_GBL_DATA_OFFSET = 0x1000_0000 + 0x0400_0000 - 0x1000 = 0x13FF_F000
|
||||
* CONFIG_SYS_MONITOR_BASE = 0x13FF_F000 - CONFIG_SYS_MONITOR_LEN = 0x13FB_F000
|
||||
* CONFIG_SYS_MALLOC_BASE = 0x13FB_F000 - CONFIG_SYS_MALLOC_LEN = 0x13EF_F000
|
||||
*
|
||||
* 0x1000_0000 CONFIG_SYS_SDRAM_BASE
|
||||
* MEMTEST_AREA 64kB
|
||||
* FREE
|
||||
* 0x1200_0000 CONFIG_SYS_TEXT_BASE
|
||||
* U-BOOT code
|
||||
* 0x1202_0000
|
||||
* FREE
|
||||
*
|
||||
* STACK
|
||||
* 0x13EF_F000 CONFIG_SYS_MALLOC_BASE
|
||||
* MALLOC_AREA 768kB Alloc
|
||||
* 0x13FB_F000 CONFIG_SYS_MONITOR_BASE
|
||||
* MONITOR_CODE 256kB Env
|
||||
* 0x13FF_F000 CONFIG_SYS_GBL_DATA_OFFSET
|
||||
* GLOBAL_DATA 4kB bd, gd
|
||||
* 0x1400_0000 CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_OF_CONTROL
|
||||
/* ddr sdram - main memory */
|
||||
#define CONFIG_SYS_SDRAM_BASE XILINX_RAM_START
|
||||
#define CONFIG_SYS_SDRAM_SIZE XILINX_RAM_SIZE
|
||||
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
|
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x1000)
|
||||
# define CONFIG_SYS_SDRAM_BASE XILINX_RAM_START
|
||||
# define CONFIG_SYS_SDRAM_SIZE XILINX_RAM_SIZE
|
||||
#endif
|
||||
|
||||
/* global pointer */
|
||||
/* start of global data */
|
||||
#define CONFIG_SYS_GBL_DATA_OFFSET \
|
||||
(CONFIG_SYS_SDRAM_SIZE - GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_MALLOC_LEN 0xC0000
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
# define CONFIG_SYS_MALLOC_F_LEN 1024
|
||||
#else
|
||||
# define CONFIG_SYS_MALLOC_SIMPLE
|
||||
# define CONFIG_SYS_MALLOC_F_LEN 0x150
|
||||
#endif
|
||||
|
||||
/* monitor code */
|
||||
#define SIZE 0x40000
|
||||
#define CONFIG_SYS_MONITOR_LEN SIZE
|
||||
#define CONFIG_SYS_MONITOR_BASE \
|
||||
(CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET \
|
||||
- CONFIG_SYS_MONITOR_LEN - GENERATED_BD_INFO_SIZE)
|
||||
#define CONFIG_SYS_MONITOR_END \
|
||||
(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
|
||||
#define CONFIG_SYS_MALLOC_LEN (SIZE * 3)
|
||||
#define CONFIG_SYS_MALLOC_BASE \
|
||||
(CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
|
||||
|
||||
/* stack */
|
||||
#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_MALLOC_BASE
|
||||
/* Stack location before relocation */
|
||||
#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_TEXT_BASE
|
||||
|
||||
/*
|
||||
* CFI flash memory layout - Example
|
||||
@@ -452,7 +412,10 @@
|
||||
#define CONFIG_SPL_LDSCRIPT "arch/microblaze/cpu/u-boot-spl.lds"
|
||||
|
||||
#define CONFIG_SPL_RAM_DEVICE
|
||||
#define CONFIG_SPL_NOR_SUPPORT
|
||||
#ifdef CONFIG_SYS_FLASH_BASE
|
||||
# define CONFIG_SPL_NOR_SUPPORT
|
||||
# define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_FLASH_BASE
|
||||
#endif
|
||||
|
||||
/* for booting directly linux */
|
||||
#define CONFIG_SPL_OS_BOOT
|
||||
@@ -468,36 +431,20 @@
|
||||
/* BRAM start */
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR 0x0
|
||||
/* BRAM size - will be generated */
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE 0x10000
|
||||
/* Stack pointer prior relocation, must situated at on-chip RAM */
|
||||
#define CONFIG_SYS_SPL_MALLOC_END (CONFIG_SYS_INIT_RAM_ADDR + \
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE 0x100000
|
||||
|
||||
# define CONFIG_SPL_STACK_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
|
||||
CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
|
||||
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100
|
||||
|
||||
/*
|
||||
* The main reason to do it in this way is that MALLOC_START
|
||||
* can't be defined - common/spl/spl.c
|
||||
*/
|
||||
#if (CONFIG_SYS_SPL_MALLOC_SIZE != 0)
|
||||
# define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_SPL_MALLOC_END - \
|
||||
CONFIG_SYS_SPL_MALLOC_SIZE)
|
||||
# define CONFIG_SPL_STACK_ADDR CONFIG_SYS_SPL_MALLOC_START
|
||||
#else
|
||||
# define CONFIG_SPL_STACK_ADDR CONFIG_SYS_SPL_MALLOC_END
|
||||
#endif
|
||||
CONFIG_SYS_MALLOC_F_LEN)
|
||||
|
||||
/* Just for sure that there is a space for stack */
|
||||
#define CONFIG_SPL_STACK_SIZE 0x100
|
||||
|
||||
#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_FLASH_BASE
|
||||
#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE
|
||||
|
||||
#define CONFIG_SPL_MAX_FOOTPRINT (CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
CONFIG_SYS_INIT_RAM_ADDR - \
|
||||
GENERATED_GBL_DATA_SIZE - \
|
||||
CONFIG_SYS_SPL_MALLOC_SIZE - \
|
||||
CONFIG_SYS_MALLOC_F_LEN - \
|
||||
CONFIG_SPL_STACK_SIZE)
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
Reference in New Issue
Block a user