[BSP/rockchip/rk3568] fixup heapmem init flow

In RT-Smart, `rt_hw_interrupt_init` will call
`rt_ioremap` to map GIC's MMIO registers. There
is a `rt_malloc` called in rt_ioremap, that will
fail if we not init the mem heap yet.

Signed-off-by: GuEe-GUI <GuEe-GUI@github.com>
This commit is contained in:
GuEe-GUI 2023-09-15 09:51:10 +08:00 committed by Meco Man
parent a76f344cb0
commit a6e9c386ff
1 changed files with 4 additions and 1 deletions

View File

@ -62,6 +62,10 @@ void rt_hw_board_init(void)
rt_hw_mmu_setup(&rt_kernel_space, platform_mem_desc, platform_mem_desc_size);
#ifdef RT_USING_HEAP
/* initialize memory system */
rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
#endif
/* initialize hardware interrupt */
rt_hw_interrupt_init();
@ -84,7 +88,6 @@ void rt_hw_board_init(void)
#ifdef RT_USING_HEAP
/* initialize memory system */
rt_kprintf("heap: [0x%08x - 0x%08x]\n", RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
#endif
#ifdef RT_USING_COMPONENTS_INIT