psci: finish psci_present implementation

This was already declared in psci.h, but it was never defined/set.  Do
this now, so we can use it to decide if enable-method in /cpus FDT nodes
should be inspected later on.  While we're here, convert it to a
boolean.

Reviewed by:	andrew (slightly earlier version)
Differential Revision:	https://reviews.freebsd.org/D34553
This commit is contained in:
Kyle Evans 2022-03-18 22:03:44 -05:00
parent 1236b04bb7
commit 2218070b2c
2 changed files with 3 additions and 1 deletions

View File

@ -84,6 +84,7 @@ static int psci_v0_1_init(device_t dev, int default_version);
static int psci_v0_2_init(device_t dev, int default_version);
struct psci_softc *psci_softc = NULL;
bool psci_present;
#ifdef __arm__
#define USE_ACPI 0
@ -347,6 +348,7 @@ psci_attach(device_t dev, psci_initfn_t psci_init, int default_version)
return (ENXIO);
psci_softc = sc;
psci_present = true;
return (0);
}

View File

@ -37,7 +37,7 @@ typedef int (*psci_callfn_t)(register_t, register_t, register_t, register_t,
register_t, register_t, register_t, register_t,
struct arm_smccc_res *res);
extern int psci_present;
extern bool psci_present;
int psci_cpu_on(unsigned long, unsigned long, unsigned long);
void psci_reset(void);