aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2019-07-12 16:47:44 +0530
committerOliver O'Halloran <oohall@gmail.com>2019-08-15 17:52:41 +1000
commit935fccb098b454a06c6d01496eb4da32efc0c03f (patch)
tree0b3edf1d8a1b77eaa2b5000a88f7ce99a06383d0
parentbbe6e969662f8e26ef945f7aadc1c9543565196d (diff)
downloadskiboot-935fccb098b454a06c6d01496eb4da32efc0c03f.zip
skiboot-935fccb098b454a06c6d01496eb4da32efc0c03f.tar.gz
skiboot-935fccb098b454a06c6d01496eb4da32efc0c03f.tar.bz2
hdata: Update spirah structure
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>
-rw-r--r--hdata/spira.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index b2c9615..72c72f3 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -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)),
},
},
};