linker: add bits for boot regions
This adds the necessary bits for linker scripts and source code to specify which symbols are needed for boot process so they can be grouped together. One use of this is to group boot related code and data so these won't interval with other kernel and application for better caching. This is a must for demand paging as some functions and data must be available during the boot process and before the memory manager is initialized. During this time, paging cannot be used so symbols linked in virtual memory space are unavailable. This is up to the arch/SoC/board to define the sections in their linker scripts as section may need special alignment which cannot be done in common script snippets. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
af49ec0277
commit
d812728ec4
6 changed files with 103 additions and 0 deletions
|
@ -317,6 +317,30 @@ extern char __tls_end[];
|
|||
extern char __tls_size[];
|
||||
#endif /* CONFIG_THREAD_LOCAL_STORAGE */
|
||||
|
||||
#ifdef CONFIG_LINKER_USE_BOOT_SECTION
|
||||
/* lnkr_boot_start[] and lnkr_boot_end[]
|
||||
* must encapsulate all the boot sections.
|
||||
*/
|
||||
extern char lnkr_boot_start[];
|
||||
extern char lnkr_boot_end[];
|
||||
|
||||
extern char lnkr_boot_text_start[];
|
||||
extern char lnkr_boot_text_end[];
|
||||
extern char lnkr_boot_text_size[];
|
||||
extern char lnkr_boot_data_start[];
|
||||
extern char lnkr_boot_data_end[];
|
||||
extern char lnkr_boot_data_size[];
|
||||
extern char lnkr_boot_rodata_start[];
|
||||
extern char lnkr_boot_rodata_end[];
|
||||
extern char lnkr_boot_rodata_size[];
|
||||
extern char lnkr_boot_bss_start[];
|
||||
extern char lnkr_boot_bss_end[];
|
||||
extern char lnkr_boot_bss_size[];
|
||||
extern char lnkr_boot_noinit_start[];
|
||||
extern char lnkr_boot_noinit_end[];
|
||||
extern char lnkr_boot_noinit_size[];
|
||||
#endif /* CONFIG_LINKER_USE_BOOT_SECTION */
|
||||
|
||||
#endif /* ! _ASMLANGUAGE */
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_LINKER_LINKER_DEFS_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue