Skip to content

Commit

Permalink
hdata: Update spirah structure
Browse files Browse the repository at this point in the history
Update MDST, MDDT and MDRT ntuple inside SPIRAH. During MPIPL
hostboot will use these details to preserve memory.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
[oliver: rebased]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Aug 15, 2019
1 parent bbe6e96 commit 935fccb
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions hdata/spira.c
Expand Up @@ -181,10 +181,31 @@ __section(".spirah.data") struct spirah spirah = {
#endif
.mdump_src = {
.addr = CPU_TO_BE64(MDST_TABLE_OFF),
.alloc_cnt = CPU_TO_BE16(ARRAY_SIZE(init_mdst_table)),
.alloc_cnt = CPU_TO_BE16(MDST_TABLE_SIZE / sizeof(struct mdst_table)),
.act_cnt = CPU_TO_BE16(ARRAY_SIZE(init_mdst_table)),
.alloc_len =
CPU_TO_BE32(sizeof(init_mdst_table)),
.alloc_len = CPU_TO_BE32(sizeof(struct mdst_table)),
.act_len = CPU_TO_BE32(sizeof(struct mdst_table)),
},
.mdump_dst = {
.addr = CPU_TO_BE64(MDDT_TABLE_OFF),
.alloc_cnt = CPU_TO_BE16(MDDT_TABLE_SIZE / sizeof(struct mddt_table)),
.act_cnt = CPU_TO_BE16(0),
.alloc_len = CPU_TO_BE32(sizeof(struct mddt_table)),
.act_len = CPU_TO_BE32(sizeof(struct mddt_table)),
},
.mdump_res = {
.addr = CPU_TO_BE64(MDRT_TABLE_BASE),
.alloc_cnt = CPU_TO_BE16(MDRT_TABLE_SIZE / sizeof(struct mdrt_table)),
/*
* XXX: Ideally hostboot should use allocated count and
* length. But looks like hostboot uses actual count
* and length to get MDRT table size. And post dump
* hostboot will update act_cnt. Hence update both
* alloc_cnt and act_cnt.
*/
.act_cnt = CPU_TO_BE16(MDRT_TABLE_SIZE / sizeof(struct mdrt_table)),
.alloc_len = CPU_TO_BE32(sizeof(struct mdrt_table)),
.act_len = CPU_TO_BE32(sizeof(struct mdrt_table)),
},
},
};
Expand Down

0 comments on commit 935fccb

Please sign in to comment.