git: e89be21854b3 - main - Add a psci macro to build a version value
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Mar 2023 13:17:12 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e89be21854b3aa33efd2e06529a181343281659d commit e89be21854b3aa33efd2e06529a181343281659d Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2023-03-16 12:14:01 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2023-03-16 13:08:00 +0000 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 {