Author: andrew Date: Wed Jun 13 15:24:07 2018 New Revision: 335061 URL: https://svnweb.freebsd.org/changeset/base/335061
Log: Move psci_call to a header file so we can use it in other files to communicate with the firmware. Sponsored by: DARPA, AFRL Modified: head/sys/dev/psci/psci.c head/sys/dev/psci/psci.h Modified: head/sys/dev/psci/psci.c ============================================================================== --- head/sys/dev/psci/psci.c Wed Jun 13 14:55:31 2018 (r335060) +++ head/sys/dev/psci/psci.c Wed Jun 13 15:24:07 2018 (r335061) @@ -110,14 +110,7 @@ static void psci_shutdown(void *, int); static int psci_find_callfn(psci_callfn_t *); static int psci_def_callfn(register_t, register_t, register_t, register_t); -static psci_callfn_t psci_callfn = psci_def_callfn; - -static inline int -psci_call(register_t a, register_t b, register_t c, register_t d) -{ - - return (psci_callfn(a, b, c, d)); -} +psci_callfn_t psci_callfn = psci_def_callfn; static void psci_init(void *dummy) Modified: head/sys/dev/psci/psci.h ============================================================================== --- head/sys/dev/psci/psci.h Wed Jun 13 14:55:31 2018 (r335060) +++ head/sys/dev/psci/psci.h Wed Jun 13 15:24:07 2018 (r335061) @@ -41,6 +41,14 @@ void psci_reset(void); int32_t psci_features(uint32_t); int psci_get_version(void); +/* Handler to let us call into the PSCI/SMCCC firmware */ +extern psci_callfn_t psci_callfn; +static inline int +psci_call(register_t a, register_t b, register_t c, register_t d) +{ + + return (psci_callfn(a, b, c, d)); +} /* One of these handlers will be selected during the boot */ int psci_hvc_despatch(register_t, register_t, register_t, register_t); int psci_smc_despatch(register_t, register_t, register_t, register_t); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"