From e89be21854b3aa33efd2e06529a181343281659d Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 16 Mar 2023 12:14:01 +0000 Subject: [PATCH] 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 --- sys/dev/psci/psci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/psci/psci.h b/sys/dev/psci/psci.h index be5f55f49115..671f082bb119 100644 --- a/sys/dev/psci/psci.h +++ b/sys/dev/psci/psci.h @@ -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_MINOR(v) ((v) & 0xFF) +#define PSCI_VER(maj, min) (((maj) << 16) | (min)) #ifdef _KERNEL enum psci_fn {