提交 ac96307e 编写于 作者: X Xie XiuQi

arm64/mpam: hard code mpam resource for Hi1620 2P

hulk inclusion
category: feature
bugzilla: 5510
CVE: NA
Signed-off-by: NXie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 bfc39ac1
...@@ -67,98 +67,38 @@ char *mpam_types_str[] = { ...@@ -67,98 +67,38 @@ char *mpam_types_str[] = {
"MPAM_RESOURCE_MC", "MPAM_RESOURCE_MC",
}; };
struct mpam_node mpam_node_all[] = { /*
/* P0 DIE 0: cluster 0 */ * Hi1620 2P Base Address Map
{ *
.name = "L3T0", * AFF2 | NODE | DIE | Base Address
.type = MPAM_RESOURCE_CACHE, * ------------------------------------
.addr = 0x90390000, * 01 | 0 | P0 TB | 0x000098xxxxxx
.cpus_list = "0-3", * 03 | 1 | P0 TA | 0x000090xxxxxx
.default_ctrl = 0x7fff, * 05 | 2 | P1 TB | 0x400098xxxxxx
}, * 07 | 3 | P2 TA | 0x400090xxxxxx
*
/* P0 DIE 0: cluster 1 */ * AFF2: MPIDR.AFF2
{ */
.name = "L3T1",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x903a0000,
.cpus_list = "4-7",
.default_ctrl = 0x7fff,
},
/* P0 DIE 0: cluster 2 */
{
.name = "L3T2",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x903b0000,
.cpus_list = "8-11",
.default_ctrl = 0x7fff,
},
/* P0 DIE 0: cluster 3 */
{
.name = "L3T3",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x903c0000,
.cpus_list = "12-15",
.default_ctrl = 0x7fff,
},
#if 0 // run emu we run 6 clusters 24 cores
{
.name = "L3T4",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x903d0000,
.cpus_list = "16-19",
},
{
.name = "L3T5",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x903e0000,
.cpus_list = "20-23",
},
{
.name = "L3T6",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x903f0000,
.cpus_list = "24-27",
},
{
.name = "L3T7",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x90400000,
.cpus_list = "28-31",
},
{
.name = "L3TALL",
.type = MPAM_RESOURCE_CACHE,
.addr = 0x90B90000,
.cpus_list = "0-23",
.default_ctrl = 0x7fff,
},
#endif
/* P0 DIE 0: HHA0 */ #define MPAM_BASE(suffix, offset) ((suffix) << 24 | (offset) << 16)
{ #define MPAM_NODE(n, t, suffix, offset) \
.name = "HHA0", { \
.type = MPAM_RESOURCE_MC, .name = #n, \
.addr = 0x90410000, .type = t, \
.cpus_list = "0-3", .addr = MPAM_BASE(suffix, (offset)), \
}, .cpus_list = "0", \
}
/* P0 DIE 0: HHA1 */ struct mpam_node mpam_node_all[] = {
{ MPAM_NODE(L3TALL0, MPAM_RESOURCE_CACHE, 0x000098ULL, 0xB9),
.name = "HHA1", MPAM_NODE(L3TALL1, MPAM_RESOURCE_CACHE, 0x000090ULL, 0xB9),
.type = MPAM_RESOURCE_MC, MPAM_NODE(L3TALL2, MPAM_RESOURCE_CACHE, 0x400098ULL, 0xB9),
.addr = 0x90420000, MPAM_NODE(L3TALL3, MPAM_RESOURCE_CACHE, 0x400090ULL, 0xB9),
.cpus_list = "0-3",
}, MPAM_NODE(HHAALL0, MPAM_RESOURCE_MC, 0x000098ULL, 0xC1),
{ MPAM_NODE(HHAALL1, MPAM_RESOURCE_MC, 0x000090ULL, 0xC1),
.name = "HHALL", MPAM_NODE(HHAALL2, MPAM_RESOURCE_MC, 0x400098ULL, 0xC1),
.type = MPAM_RESOURCE_MC, MPAM_NODE(HHAALL3, MPAM_RESOURCE_MC, 0x400090ULL, 0xC1),
.addr = 0x90C10000,
.cpus_list = "0-3",
},
/* other mpam nodes ... */
}; };
int mpam_nodes_init(void) int mpam_nodes_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册