aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2018-02-05 15:00:08 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-02-20 00:09:22 -0600
commit08b1929052f8dfa1cc6b0ab3a9df77c9b5493914 (patch)
tree641ffdba280e694275b72b907bc570d062af1699
parentac8a62b09c6343b9f992450dffa448e3bb416c53 (diff)
downloadskiboot-08b1929052f8dfa1cc6b0ab3a9df77c9b5493914.zip
skiboot-08b1929052f8dfa1cc6b0ab3a9df77c9b5493914.tar.gz
skiboot-08b1929052f8dfa1cc6b0ab3a9df77c9b5493914.tar.bz2
phb3/phb4/p7ioc: Document supported TCE sizes in DT
Add a new property, "ibm,supported-tce-sizes", to advertise to Linux how big the available TCE sizes are. Each value is a bit shift, from smallest to largest. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/p7ioc-phb.c5
-rw-r--r--hw/phb3.c5
-rw-r--r--hw/phb4.c5
3 files changed, 15 insertions, 0 deletions
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
index 6c07451..b0a26e8 100644
--- a/hw/p7ioc-phb.c
+++ b/hw/p7ioc-phb.c
@@ -2596,6 +2596,11 @@ static void p7ioc_pcie_add_node(struct p7ioc_phb *p)
tkill = reg[0] + PHB_TCE_KILL;
dt_add_property_cells(np, "ibm,opal-tce-kill",
hi32(tkill), lo32(tkill));
+ dt_add_property_cells(np, "ibm,supported-tce-sizes",
+ 12, // 4K
+ 16, // 64K
+ 24, // 16M
+ 34); // 16G
/*
* Linux may use this property to allocate the diag data buffer, which
diff --git a/hw/phb3.c b/hw/phb3.c
index 0b4c3c3..0c4e1eb 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -4469,6 +4469,11 @@ static void phb3_add_properties(struct phb3 *p)
tkill = reg + PHB_TCE_KILL;
dt_add_property_cells(np, "ibm,opal-tce-kill",
hi32(tkill), lo32(tkill));
+ dt_add_property_cells(np, "ibm,supported-tce-sizes",
+ 12, // 4K
+ 16, // 64K
+ 24, // 16M
+ 28); // 256M
/*
* Indicate to Linux that the architected IODA2 MSI EOI method
diff --git a/hw/phb4.c b/hw/phb4.c
index 7f9de33..eedddcd 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -4708,6 +4708,11 @@ static void phb4_add_properties(struct phb4 *p)
/* M64 ranges start at 1 as MBT0 is used for M32 */
dt_add_property_cells(np, "ibm,opal-available-m64-ranges",
1, p->mbt_size - 1);
+ dt_add_property_cells(np, "ibm,supported-tce-sizes",
+ 12, // 4K
+ 16, // 64K
+ 21, // 2M
+ 30); // 1G
/* Tell Linux about alignment limits for segment splits.
*