kernel: add CONFIG_SRAM_OFFSET
This adds a new kconfig CONFIG_SRAM_OFFSET to specify the offset
from beginning of SRAM where the kernel begins. On x86 and
PC compatible platforms, the first 1MB of RAM is reserved and
Zephyr should not link anything there. However, this 1MB still
needs to be mapped by the MMU to access various platform related
information. CONFIG_SRAM_OFFSET serves similar function as
CONFIG_KERNEL_VM_OFFSET and is needed for proper phys/virt
address translations.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
diff --git a/Kconfig.zephyr b/Kconfig.zephyr
index 68864a1..190d055 100644
--- a/Kconfig.zephyr
+++ b/Kconfig.zephyr
@@ -167,6 +167,22 @@
in decreasing size of symbols. This helps to minimize
padding between symbols.
+config HAS_SRAM_OFFSET
+ bool
+ help
+ This option is selected by targets that require SRAM_OFFSET.
+
+config SRAM_OFFSET
+ hex "Kernel SRAM offset" if HAS_SRAM_OFFSET
+ default 0
+ help
+ This option specifies the byte offset from the beginning of SRAM
+ where the kernel begins. Changing this value from zero will affect
+ the Zephyr image's link, and will decrease the total amount of
+ SRAM available for use by application code.
+
+ If unsure, leave at the default value 0.
+
endmenu
menu "Compiler Options"