summaryrefslogtreecommitdiffstats
path: root/hdata
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2019-02-19 18:53:36 +1100
committerStewart Smith <stewart@linux.ibm.com>2019-02-20 00:33:13 -0600
commit3eadafbd35aeefed73aa9519df4cc6d6b34a3cf2 (patch)
treecdd17d55ec76b24170286e4c848ed63021733f02 /hdata
parent01f977c33d46f35ae6735c874d415a793d7bd9af (diff)
downloadblackbird-skiboot-3eadafbd35aeefed73aa9519df4cc6d6b34a3cf2.tar.gz
blackbird-skiboot-3eadafbd35aeefed73aa9519df4cc6d6b34a3cf2.zip
hdata/test: Fix up linux,sml-base property
The linux,sml-base property stores a raw pointer into the HDAT area. When running the hdat parser tester the load address of the HDAT will change each time the tool is run so we need to sanatise the property to get consistent output. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/test/hdata_to_dt.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hdata/test/hdata_to_dt.c b/hdata/test/hdata_to_dt.c
index fd2957ce..a5f152e8 100644
--- a/hdata/test/hdata_to_dt.c
+++ b/hdata/test/hdata_to_dt.c
@@ -253,8 +253,23 @@ static void squash_blobs(struct dt_node *root)
static void dump_hdata_fdt(struct dt_node *root)
{
+ struct dt_node *n;
void *fdt_blob;
+ /* delete some properties that hardcode pointers */
+ dt_for_each_node(dt_root, n) {
+ struct dt_property *base;
+
+ /*
+ * sml-base is a raw pointer into the HDAT area so it changes
+ * on each execution of hdata_to_dt. Work around this by
+ * zeroing it.
+ */
+ base = __dt_find_property(n, "linux,sml-base");
+ if (base)
+ memset(base->prop, 0, base->len);
+ }
+
fdt_blob = create_dtb(root, false);
if (!fdt_blob) {
OpenPOWER on IntegriCloud