Add a handler for the PSCI_FEATURES function. This needs PSCI 1.0, so
check for this, returning an error if the version is too old. Sponsored by: DARPA, AFRL
This commit is contained in:
parent
4493861b9a
commit
5add83935a
@ -414,6 +414,20 @@ psci_find_callfn(psci_callfn_t *callfn)
|
||||
return (PSCI_RETVAL_SUCCESS);
|
||||
}
|
||||
|
||||
int32_t
|
||||
psci_features(uint32_t psci_func_id)
|
||||
{
|
||||
|
||||
if (psci_softc == NULL)
|
||||
return (PSCI_RETVAL_NOT_SUPPORTED);
|
||||
|
||||
/* The feature flags were added to PSCI 1.0 */
|
||||
if (PSCI_VER_MAJOR(psci_softc->psci_version) < 1)
|
||||
return (PSCI_RETVAL_NOT_SUPPORTED);
|
||||
|
||||
return (psci_call(PSCI_FNID_FEATURES, psci_func_id, 0, 0));
|
||||
}
|
||||
|
||||
int
|
||||
psci_cpu_on(unsigned long cpu, unsigned long entry, unsigned long context_id)
|
||||
{
|
||||
|
@ -36,12 +36,15 @@ typedef int (*psci_callfn_t)(register_t, register_t, register_t, register_t);
|
||||
|
||||
extern int psci_present;
|
||||
|
||||
void psci_reset(void);
|
||||
int psci_cpu_on(unsigned long, unsigned long, unsigned long);
|
||||
void psci_reset(void);
|
||||
int32_t psci_features(uint32_t);
|
||||
int psci_get_version(void);
|
||||
|
||||
/* 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);
|
||||
|
||||
int psci_get_version(void);
|
||||
|
||||
/*
|
||||
* PSCI return codes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user