Skip to content

Commit

Permalink
core: virt: initialize heap from virt_guest_created()
Browse files Browse the repository at this point in the history
Replace the preinit_early() guest heap initialization with function call
in virt_guest_created().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jenswi-linaro committed Sep 3, 2024
1 parent 47fd720 commit 83c755a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
11 changes: 0 additions & 11 deletions core/arch/arm/kernel/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,17 +912,6 @@ static void update_external_dt(void)
}
#endif /*!CFG_DT*/

#ifdef CFG_NS_VIRTUALIZATION
static TEE_Result virt_init_heap(void)
{
/* We need to initialize pool for every virtual guest partition */
malloc_add_pool(__heap1_start, __heap1_end - __heap1_start);

return TEE_SUCCESS;
}
preinit_early(virt_init_heap);
#endif

void init_tee_runtime(void)
{
#ifndef CFG_WITH_PAGER
Expand Down
1 change: 1 addition & 0 deletions core/arch/arm/kernel/virtualization.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ TEE_Result virt_guest_created(uint16_t guest_id)

set_current_prtn(prtn);

malloc_add_pool(__heap1_start, __heap1_end - __heap1_start);
/* Initialize threads */
thread_init_threads();
/* Do the preinitcalls */
Expand Down

0 comments on commit 83c755a

Please sign in to comment.