diff mbox

opal: Don't put the symbol map whole into a property

Message ID 1417739959.4741.44.camel@kernel.crashing.org
State Accepted, archived
Headers show

Commit Message

Benjamin Herrenschmidt Dec. 5, 2014, 12:39 a.m. UTC
The huge property trips a bug in some versions of kexec, and it generally
makes looking at the device-tree more painful than it has to be. Instead,
let's just pass the address & size and we'll add a debugfs file on the
Linux side to recover them.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
diff mbox

Patch

diff --git a/core/opal.c b/core/opal.c
index 5b96064..044ff92 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -115,12 +115,14 @@  void __opal_register(uint64_t token, void *func, unsigned int nargs)
 static void add_opal_firmware_node(void)
 {
 	struct dt_node *firmware = dt_new(opal_node, "firmware");
-
+	uint64_t sym_start = (uint64_t)__sym_map_start;
+	uint64_t sym_size = (uint64_t)__sym_map_end - sym_start;
 	dt_add_property_string(firmware, "compatible", "ibm,opal-firmware");
 	dt_add_property_string(firmware, "name", "firmware");
 	dt_add_property_string(firmware, "version", version);
-	dt_add_property(firmware, "symbol-map", __sym_map_start,
-			__sym_map_end - __sym_map_start);
+	dt_add_property_cells(firmware, "symbol-map",
+			      hi32(sym_start), lo32(sym_start),
+			      hi32(sym_size), lo32(sym_size));
 }
 
 void add_opal_node(void)