diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-06-04 11:43:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-06-04 11:54:03 +0200 |
commit | 596c8450727ff2c9e2a8053e83280682d813c82f (patch) | |
tree | b1623de1d69f75765cffd8db50083a6faa64c8b4 /include/asm-generic | |
parent | 9e6ee5e79516f5af5366bd95fab801a692728373 (diff) | |
download | barebox-596c8450727ff2c9e2a8053e83280682d813c82f.tar.gz barebox-596c8450727ff2c9e2a8053e83280682d813c82f.tar.xz |
[memory layout]: streamline memory layout
Memory layout can now be specified via kconfig options. Two
possibilities exist: default layout means the layout is stack
/ malloc heap / U-Boot. The user can also specify fixed addresses
for each TEXT_BASE / stack / malloc heap.
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/memory_layout.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-generic/memory_layout.h b/include/asm-generic/memory_layout.h new file mode 100644 index 0000000000..941cd42955 --- /dev/null +++ b/include/asm-generic/memory_layout.h @@ -0,0 +1,19 @@ +#ifndef __ASM_GENERIC_MEMORY_LAYOUT_H +#define __ASM_GENERIC_MEMORY_LAYOUT_H + +#ifdef CONFIG_MEMORY_LAYOUT_DEFAULT + +#define MALLOC_BASE (TEXT_BASE - CONFIG_MALLOC_SIZE) +#define STACK_BASE (TEXT_BASE - CONFIG_MALLOC_SIZE - CONFIG_STACK_SIZE) + +#else + +#define STACK_BASE CONFIG_STACK_BASE +#define MALLOC_BASE CONFIG_MALLOC_BASE + +#endif + +#define MALLOC_SIZE CONFIG_MALLOC_SIZE +#define STACK_SIZE CONFIG_STACK_SIZE + +#endif /* __ASM_GENERIC_MEMORY_LAYOUT_H */ |