x86: fix app shared memory if XIP enabled

This is a separate data section which needs to be copied into
RAM.

Most arches just use the kernel's _data_copy(), but x86 has its
own optimized copying code.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Adithya Baglody 2018-12-20 15:34:04 +05:30 committed by Anas Nashif
commit 9bebf4cb23
3 changed files with 10 additions and 0 deletions

View file

@ -322,6 +322,14 @@ __csSet:
call _x86_data_copy
#endif /* CONFIG_APPLICATION_MEMORY */
#ifdef CONFIG_APP_SHARED_MEM
movl $_app_smem_start, %edi /* DATA in RAM (dest) */
movl $_app_smem_rom_start, %esi /* DATA in ROM (src) */
movl $_app_smem_num_words, %ecx /* Size of DATA in quad bytes */
call _x86_data_copy
#endif /* CONFIG_APP_SHARED_MEM */
#endif /* CONFIG_XIP */
/*

View file

@ -214,6 +214,7 @@ SECTIONS
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
_app_smem_size = _app_smem_end - _app_smem_start;
_app_smem_num_words = _app_smem_size >> 2;
_app_smem_rom_start = LOADADDR(_APP_SMEM_SECTION_NAME);

View file

@ -167,6 +167,7 @@ extern char _app_smem_start[];
extern char _app_smem_end[];
extern char _app_smem_size[];
extern char _app_smem_rom_start[];
extern char _app_smem_num_words[];
#ifdef CONFIG_APPLICATION_MEMORY
/* Memory owned by the application. Start and end will be aligned for memory