[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:
parent
a76f344cb0
commit
a6e9c386ff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue