aboutsummaryrefslogtreecommitdiff
path: root/include/occ.h
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2018-06-20 13:49:37 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-06-27 17:19:01 +1000
commit9b394a32c8ea45c56db62ddddb322b45ffef9fd0 (patch)
tree4986a84e7ce5460bc3fbc6beab09771a0f9aaf24 /include/occ.h
parentef623f91e5c4719e65784fa976f9227a6926939d (diff)
downloadskiboot-9b394a32c8ea45c56db62ddddb322b45ffef9fd0.zip
skiboot-9b394a32c8ea45c56db62ddddb322b45ffef9fd0.tar.gz
skiboot-9b394a32c8ea45c56db62ddddb322b45ffef9fd0.tar.bz2
occ: Add support for GPU presence detection
On the Witherspoon platform, we need to distinguish between NVLink GPUs and OpenCAPI accelerators. In order to do this, we first need to find out whether the SXM2 socket is populated. On Witherspoon, the SXM2 socket's presence detection pin is only visible via I2C from the APSS, and thus can only be exposed to the host via the OCC. The OCC, per OCC Firmware Interface Specification for POWER9 version 0.22, now exposes this to skiboot through a field in the dynamic data shared memory. Add the necessary dynamic data changes required to read the version and GPU presence fields. Add a function, occ_get_gpu_presence(), that can be used to check GPU presence. If the OCC isn't reporting presence (old OCC firmware, or some other reason), we default to assuming there is a device present and wait until link training to fail. This will be used in later patches to fix up the NPU2 probe path for OpenCAPI support on Witherspoon. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include/occ.h')
-rw-r--r--include/occ.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/occ.h b/include/occ.h
index c9faef9..a46b921 100644
--- a/include/occ.h
+++ b/include/occ.h
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <chip.h>
+
/* OCC Functions */
extern void occ_pstates_init(void);
@@ -36,6 +38,8 @@ enum pnor_owner {
};
extern void occ_pnor_set_owner(enum pnor_owner owner);
+/* GPU presence detection */
+bool occ_get_gpu_presence(struct proc_chip *chip, int gpu_num);
/* OCC Inband Sensors */
extern bool occ_sensors_init(void);