aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/p7ioc-phb.c9
-rw-r--r--hw/phb3.c3
-rw-r--r--hw/phb4.c3
3 files changed, 15 insertions, 0 deletions
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
index 21f6c3e..6c07451 100644
--- a/hw/p7ioc-phb.c
+++ b/hw/p7ioc-phb.c
@@ -2597,6 +2597,15 @@ static void p7ioc_pcie_add_node(struct p7ioc_phb *p)
dt_add_property_cells(np, "ibm,opal-tce-kill",
hi32(tkill), lo32(tkill));
+ /*
+ * Linux may use this property to allocate the diag data buffer, which
+ * can be used for either of these structs. Pass the largest to ensure
+ * they can both fit in this buffer.
+ */
+ dt_add_property_cells(np, "ibm,phb-diag-data-size",
+ MAX(sizeof(struct OpalIoP7IOCPhbErrorData),
+ sizeof(struct OpalIoP7IOCErrorData)));
+
/* Add associativity properties */
add_chip_dev_associativity(np);
diff --git a/hw/phb3.c b/hw/phb3.c
index 9bc9d78..deb0d38 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -4598,6 +4598,9 @@ static void phb3_add_properties(struct phb3 *p)
IVT_TABLE_STRIDE);
dt_add_property_cells(np, "ibm,opal-rba-table",
hi32(p->tbl_rba), lo32(p->tbl_rba), RBA_TABLE_SIZE);
+
+ dt_add_property_cells(np, "ibm,phb-diag-data-size",
+ sizeof(struct OpalIoPhb3ErrorData));
}
static bool phb3_calculate_windows(struct phb3 *p)
diff --git a/hw/phb4.c b/hw/phb4.c
index e1f0bcb..0b0c3d8 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -3087,6 +3087,9 @@ static void phb4_add_properties(struct phb4 *p)
hi32(p->tbl_peltv), lo32(p->tbl_peltv), p->tbl_peltv_size);
dt_add_property_cells(np, "ibm,opal-pest-table",
hi32(p->tbl_pest), lo32(p->tbl_pest), p->tbl_pest_size);
+
+ dt_add_property_cells(np, "ibm,phb-diag-data-size",
+ sizeof(struct OpalIoPhb4ErrorData));
}
static bool phb4_calculate_windows(struct phb4 *p)