aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2020-02-10 21:46:35 +0530
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2020-03-10 14:17:46 +0530
commitd0e472a76f1ad5f8ce0f1b7929db1eea55041609 (patch)
treec95d6f0459f3b59dfe2cf08d6ef73f6033fdf9ad /include
parent42d9d2ba5bddec06d5bb2e24909269610e62e661 (diff)
downloadskiboot-d0e472a76f1ad5f8ce0f1b7929db1eea55041609.zip
skiboot-d0e472a76f1ad5f8ce0f1b7929db1eea55041609.tar.gz
skiboot-d0e472a76f1ad5f8ce0f1b7929db1eea55041609.tar.bz2
mpipl: Rework memory reservation for OPAL dump
[ Upstream commit b0e024216a3b1d35aa2273b6f64742db7ae49861 ] During boot, OPAL reserves memory required to capture OPAL dump and architected register data. During MPIPL, hostboot will copy OPAL dump to this memory. Post MPIPL kernel will use this memory to create opalcore. We use mem_reserve_fw() for this reservation. At present this reservation happens late in the init path. It may clash with memory allocated by local_alloc(). We have two option to fix above issue: - Use local_alloc() for allocating memory for OPAL dump This works fine on first boot. We can use this method to reserve memory. But Post MPIPL we still want to reserve destination memory to make sure no one is stomping this area. Also this reservation might have happened in between other local_allocations. So in Post MPIPL boot allocator may not find enough memory in first region for other local_alloc() requests and may throw mem_alloc() error before trying to allocate from other regions. - Early memory reservation for OPAL dump Allocate and reserve memory just after memory region init. This patch uses second approach to fix reservation issue. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/opal-dump.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/opal-dump.h b/include/opal-dump.h
index 866d11a..30b60b3 100644
--- a/include/opal-dump.h
+++ b/include/opal-dump.h
@@ -124,4 +124,7 @@ extern void opal_mpipl_init(void);
/* Save metadata before triggering MPIPL */
void opal_mpipl_save_crashing_pir(void);
+/* Reserve memory to capture OPAL dump */
+extern void opal_mpipl_reserve_mem(void);
+
#endif /* __OPAL_DUMP_H */