summaryrefslogtreecommitdiffstats
path: root/doc/opal-api
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2017-03-24 12:22:25 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-03-30 19:37:48 +1100
commit5180d6555b098f67013d28c388285199b47c911b (patch)
tree012d466470ea63a9d9654727ddf22b9a9ec0e7ce /doc/opal-api
parentafc78b0856d5cba129e96bb1f006be3fd56b598a (diff)
downloadblackbird-skiboot-5180d6555b098f67013d28c388285199b47c911b.tar.gz
blackbird-skiboot-5180d6555b098f67013d28c388285199b47c911b.zip
npu2: Add OPAL calls for nvlink2 address translation services
Adds three OPAL calls for interacting with NPU2 devices: opal_npu_init_context, opal_npu_destroy_context and opal_npu_map_lpar. These are used to setup and configure address translation services (ATS) for a process/partition on a given NVLink2 device. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'doc/opal-api')
-rw-r--r--doc/opal-api/opal-npu2-141-142-143.rst66
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/opal-api/opal-npu2-141-142-143.rst b/doc/opal-api/opal-npu2-141-142-143.rst
new file mode 100644
index 00000000..541051c0
--- /dev/null
+++ b/doc/opal-api/opal-npu2-141-142-143.rst
@@ -0,0 +1,66 @@
+OPAL NPU2 calls
+================
+
+There are three OPAL calls for interacting with NPU2 devices: ::
+
+#define OPAL_NPU_INIT_CONTEXT 141
+#define OPAL_NPU_DESTROY_CONTEXT 142
+#define OPAL_NPU_MAP_LPAR 143
+
+These are used to setup and configure address translation services
+(ATS) for a given NVLink2 device. Note that in some documentation this
+is also referred to as extended translation services (XTS).
+
+Each NVLink2 supports multiple processes running on a GPU which issues
+requests for address translation. The NPU2 is responsible for
+completing the request by forwarding it to the Nest MMU (NMMU) along
+with the appropriate translation context (MSR/LPCR) bits. These bits
+are keyed off a 20-bit process ID (PASID/PID) which is identical to
+the PID used on the processor.
+
+The OPAL calls documented here are used to setup/destroy the
+appropriate context for a given process on a given NVLink2 device.
+
+OPAL_NPU_INIT_CONTEXT
+---------------------
+
+Parameters: ::
+
+ uint64_t phb_id
+ int pasid
+ uint64_t msr
+ uint64_t lpid
+
+Allocates a new context ID and sets up the given PASID/PID to be
+associated with the supplied MSR on for the given LPID. MSR should
+only contain bits set requried for NPU2 address lookups - ie. MSR
+DR/HV/PR/SF.
+
+Returns the context ID on success or ``OPAL_RESOURCE`` if no more
+contexts are available or ``OPAL_UNSUPPORTED`` in the case of
+unsupported MSR bits.
+
+OPAL_NPU_DESTROY_CONTEXT
+------------------------
+
+Parameters: ::
+
+ uint64_t phb_id
+ uint64_t id
+
+Destroys a previously allocated context ID. This may cause further
+translation requests from the GPU to fail.
+
+OPAL_NPU_MAP_LPAR
+-----------------
+
+Parameters: ::
+
+ uint64_t phb_id
+ uint64_t bdf
+ uint64_t lparid
+ uint64_t lpcr
+
+Associates the given GPU BDF with a particular LPAR and LPCR
+bits. Hash mode ATS is currently unsupported so lpcr should be set
+to 0.
OpenPOWER on IntegriCloud