diff options
author | Andrew Boie <andrew.p.boie@intel.com> | 2016-10-25 11:47:52 -0700 |
---|---|---|
committer | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-26 17:10:13 +0000 |
commit | 431607c20a01d16011754b1f5af64d9f2d07423b (patch) | |
tree | 4a36ff9619aa85ff8233cbf78f2e322ceed163a4 /include | |
parent | 9f0977791f8ba44315852bc1c1bfe1dc21469620 (diff) |
nios2: port to unified kernel
With this patch we introduce unified kernel support for NIOS II.
Not all test cases have been ported, but the following command
currently succeeds with 43/43 passing test cases:
$ sanitycheck --arch=nios2 -xKERNEL_TYPE=unified \
--tag=unified_capable
Issue: ZEP-934
Change-Id: Id8effa0369a6a22c4d0a789fa2a8e108af0e0786
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/arch/nios2/linker.ld | 11 | ||||
-rw-r--r-- | include/kernel.h | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/arch/nios2/linker.ld b/include/arch/nios2/linker.ld index 3266184cc..5d0291ed2 100644 --- a/include/arch/nios2/linker.ld +++ b/include/arch/nios2/linker.ld @@ -242,6 +242,17 @@ SECTIONS _k_event_list_end = .; } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) + SECTION_DATA_PROLOGUE(_k_memory_pool, (OPTIONAL),) + { + *(._k_memory_pool.struct*) + KEEP(*(SORT_BY_NAME("._k_memory_pool.struct*"))) + + _k_mem_pool_start = .; + *(._k_memory_pool.*) + KEEP(*(SORT_BY_NAME("._k_memory_pool*"))) + _k_mem_pool_end = .; + } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) + SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,) { diff --git a/include/kernel.h b/include/kernel.h index e126da107..13be33d69 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -1774,7 +1774,11 @@ __asm__(".macro _build_mem_pool name, min_size, max_size, n_max\n\t" static void __attribute__ ((used)) __k_mem_pool_quad_block_size_define(void) { __asm__(".globl __memory_pool_quad_block_size\n\t" +#ifdef CONFIG_NIOS2 + "__memory_pool_quad_block_size = %0\n\t" +#else "__memory_pool_quad_block_size = %c0\n\t" +#endif : : "n"(sizeof(struct k_mem_pool_quad_block))); } |