1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Email: [email protected]
*
* Change Logs:
* Date Author Notes
* 2023-04-27 huanghe first version
* 2023-07-27 zhangyan add qspi io space
*
*/
#include "rtconfig.h"
#include <board.h>
#include <mmu.h>
/* mmu config */
#ifdef RT_USING_SMART
#if defined(TARGET_ARMV8_AARCH64)
struct mem_desc platform_mem_desc[] =
{
{ KERNEL_VADDR_START,
KERNEL_VADDR_START + 0x0fffffff,
(rt_size_t)ARCH_MAP_FAILED,
NORMAL_MEM
}
};
#else
struct mem_desc platform_mem_desc[] =
{
{ KERNEL_VADDR_START,
KERNEL_VADDR_START + 0x10000000,
(rt_size_t)ARCH_MAP_FAILED,
NORMAL_MEM
}
};
#endif
#else
#if defined(TARGET_ARMV8_AARCH64)
struct mem_desc platform_mem_desc[] = {
{KERNEL_VADDR_START, DDR_END_ADDRESS , KERNEL_VADDR_START, NORMAL_MEM},
{
0x28000000U,
0x32B36FFFU,
0x28000000U,
DEVICE_MEM
},
{
0x00001000U,
0x0FFFFFFFU,
0x00001000U,
DEVICE_MEM
},
};
#else
struct mem_desc platform_mem_desc[] =
{
{
0x00U,
0x00U + 0x40000000U,
0x00U,
DEVICE_MEM
},
{
0x40000000U,
0x40000000U + 0x10000000U,
0x40000000U,
DEVICE_MEM
},
{
0x50000000U,
0x50000000U + 0x30000000U,
0x50000000U,
DEVICE_MEM
},
{
0x80000000U,
0xffffffffU,
0x80000000U,
NORMAL_MEM
},
#if defined(TARGET_ARMV8_AARCH64)
{
0x1000000000,
0x1000000000 + 0x1000000000,
0x1000000000,
DEVICE_MEM
},
{
0x2000000000,
0x2000000000 + 0x2000000000,
0x2000000000,
NORMAL_MEM
},
#endif
};
#endif
#endif
const rt_uint32_t platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
|