1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Email: opensource_embedded@phytium.com.cn
7  *
8  * Change Logs:
9  * Date        Author       Notes
10  * 2022-10-26  huanghe      first commit
11  * 2022-04-13  zhugengyu    support RT-Smart
12  * 2023-07-27  liqiaozhong  add gpio pin definition
13  *
14  */
15 
16 #ifndef __BOARD_H__
17 #define __BOARD_H__
18 
19 #include "fparameters.h"
20 #include "phytium_cpu.h"
21 
22 #include "mmu.h"
23 #ifdef RT_USING_SMART
24     #include "ioremap.h"
25 #endif
26 
27 #if defined(__CC_ARM)
28     extern int Image$$RW_IRAM1$$ZI$$Limit;
29     #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
30 #elif defined(__GNUC__)
31     extern int __bss_end;
32     #define HEAP_BEGIN ((void *)&__bss_end)
33 #endif
34 
35 #ifdef RT_USING_SMART
36     #define HEAP_END        (rt_size_t)((rt_size_t)KERNEL_VADDR_START + 64 * 1024 * 1024)
37     #define PAGE_START      HEAP_END + 1 * 1024 * 1024
38     #define PAGE_END        (rt_size_t)((rt_size_t)KERNEL_VADDR_START + 128 * 1024 * 1024)
39 #else
40     #define HEAP_END        (rt_size_t)(HEAP_BEGIN + 64*1024*1024)
41     #define PAGE_POOL_SIZE  (8ul << 20)
42     #define PAGE_START      (rt_size_t)(HEAP_END)
43     #define PAGE_END        (PAGE_START +PAGE_POOL_SIZE)
44 #endif
45 
46 void rt_hw_board_init(void);
47 
48 #endif
49