aboutsummaryrefslogtreecommitdiff
path: root/hw/phb3.c
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2017-04-20 16:46:41 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-01 13:25:39 +1000
commitc205afe6143c017cf88f60d5f5ea038fa928ff01 (patch)
tree03955e9406c794eeb662e9ea49986634da610145 /hw/phb3.c
parentaaa8ccb9a08ddf65872f0d3aff92645bb4454fb3 (diff)
downloadskiboot-c205afe6143c017cf88f60d5f5ea038fa928ff01.zip
skiboot-c205afe6143c017cf88f60d5f5ea038fa928ff01.tar.gz
skiboot-c205afe6143c017cf88f60d5f5ea038fa928ff01.tar.bz2
pci: Describe PHB diag data size in device tree
Linux hardcodes the PHB diag data buffer at (as of this commit) 8192 bytes. This has been enough for P7IOC and PHB3, but the 512 PEs of PHB4 pushes the diag data blob over this size. Rather than just increasing the hardcoded size in Linux, provide the size of the diag data blob in the device tree so that the OS can dynamically allocate as much as it needs. This both enables more space for PHB4 and less wasted memory for P7IOC and PHB3. P7IOC communicates both hub and PHB data using this buffer, so when setting the size, use whichever struct is largest. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/phb3.c')
-rw-r--r--hw/phb3.c3
1 files changed, 3 insertions, 0 deletions
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)