diff mbox

core/init: Add hdat-map property to OPAL node

Message ID 20170223022814.14153-1-matthew.brown.dev@gmail.com
State Superseded
Headers show

Commit Message

Matt Brown Feb. 23, 2017, 2:28 a.m. UTC
From: Matt Brown <brownmatt1997@gmail.com>

Exports the HDAT heap to the OS. This allows the OS to view the HDAT heap
directly.  This allows us to view the HDAT area without having to use
getmemproc.

Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com>
---
 core/opal.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/core/opal.c b/core/opal.c
index 6087e65..bcf463f 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -169,6 +169,10 @@  void add_opal_node(void)
 	dt_add_property_u64(opal_node, "opal-entry-address", entry);
 	dt_add_property_u64(opal_node, "opal-runtime-size", size);
 
+	/* Add HDAT property to node */
+	dt_add_property_u64s(opal_node, "hdat-map", SPIRA_HEAP_BASE,
+				SPIRA_HEAP_SIZE);
+
 	/* Add irqchip interrupt controller */
 	opal_event = dt_new(opal_node, "event");
 	dt_add_property_strings(opal_event, "compatible", "ibm,opal-event");