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>
This commit is contained in:
parent
ec21c0b92f
commit
ece9cad858
4 changed files with 19 additions and 3 deletions
|
@ -167,6 +167,22 @@ config LINKER_SORT_BY_ALIGNMENT
|
|||
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue