Add a psci macro to build a version value

Add PSCI_VER that takes a major and minor version and builds the value
returned by the firmware. This will be used by bhyve.

Sponsored by:	Arm Ltd
This commit is contained in:
Andrew Turner 2023-03-16 12:14:01 +00:00
parent 473ab212dc
commit e89be21854

View File

@ -103,6 +103,7 @@ psci_call(register_t a, register_t b, register_t c, register_t d)
#define PSCI_VER_MAJOR(v) (((v) >> 16) & 0xFF) #define PSCI_VER_MAJOR(v) (((v) >> 16) & 0xFF)
#define PSCI_VER_MINOR(v) ((v) & 0xFF) #define PSCI_VER_MINOR(v) ((v) & 0xFF)
#define PSCI_VER(maj, min) (((maj) << 16) | (min))
#ifdef _KERNEL #ifdef _KERNEL
enum psci_fn { enum psci_fn {