svn commit: r335055 - head/sys/dev/psci

Andrew Turner andrew at FreeBSD.org
Wed Jun 13 12:32:05 UTC 2018


Author: andrew
Date: Wed Jun 13 12:32:04 2018
New Revision: 335055
URL: https://svnweb.freebsd.org/changeset/base/335055

Log:
  Find and cache the PSCI version on driver attach.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/dev/psci/psci.c

Modified: head/sys/dev/psci/psci.c
==============================================================================
--- head/sys/dev/psci/psci.c	Wed Jun 13 12:26:37 2018	(r335054)
+++ head/sys/dev/psci/psci.c	Wed Jun 13 12:32:04 2018	(r335055)
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
 struct psci_softc {
 	device_t        dev;
 
+	uint32_t	psci_version;
 	uint32_t	psci_fnids[PSCI_FN_MAX];
 };
 
@@ -493,6 +494,7 @@ psci_v0_1_init(device_t dev)
 		sc->psci_fnids[PSCI_FN_MIGRATE] = psci_fnid;
 	}
 
+	sc->psci_version = (0 << 16) | 1;
 	if (bootverbose)
 		device_printf(dev, "PSCI version 0.1 available\n");
 
@@ -523,6 +525,7 @@ psci_v0_2_init(device_t dev)
 	if (version == PSCI_RETVAL_NOT_SUPPORTED)
 		return (1);
 
+	sc->psci_version = version;
 	if ((PSCI_VER_MAJOR(version) == 0 && PSCI_VER_MINOR(version) == 2) ||
 	    PSCI_VER_MAJOR(version) == 1) {
 		if (bootverbose)


More information about the svn-src-head mailing list