Date: Wed, 13 Jun 2018 15:24:08 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335061 - head/sys/dev/psci Message-ID: <201806131524.w5DFO8Yd096623@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806131524.w5DFO8Yd096623>