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:
parent
8bfd8457ea
commit
9bebf4cb23
3 changed files with 10 additions and 0 deletions
|
@ -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 */
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue