mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add the arch field to the arm64 MIDR macros
For completeness add accessors for the MIDR field. As the field is always 0xf on arm64 it is unneeded in the current MICR handling, but will be used in the vmm module for bhyve. Obtained from: https://github.com/FreeBSD-UPB/freebsd-src (earlier version) Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
60bae7ec04
commit
80ba994bfa
1 changed files with 3 additions and 0 deletions
|
|
@ -129,16 +129,19 @@
|
|||
#define CPU_IMPL(midr) (((midr) >> 24) & 0xff)
|
||||
#define CPU_PART(midr) (((midr) >> 4) & 0xfff)
|
||||
#define CPU_VAR(midr) (((midr) >> 20) & 0xf)
|
||||
#define CPU_ARCH(midr) (((midr) >> 16) & 0xf)
|
||||
#define CPU_REV(midr) (((midr) >> 0) & 0xf)
|
||||
|
||||
#define CPU_IMPL_TO_MIDR(val) (((val) & 0xff) << 24)
|
||||
#define CPU_PART_TO_MIDR(val) (((val) & 0xfff) << 4)
|
||||
#define CPU_VAR_TO_MIDR(val) (((val) & 0xf) << 20)
|
||||
#define CPU_ARCH_TO_MIDR(val) (((val) & 0xf) << 16)
|
||||
#define CPU_REV_TO_MIDR(val) (((val) & 0xf) << 0)
|
||||
|
||||
#define CPU_IMPL_MASK (0xff << 24)
|
||||
#define CPU_PART_MASK (0xfff << 4)
|
||||
#define CPU_VAR_MASK (0xf << 20)
|
||||
#define CPU_ARCH_MASK (0xf << 16)
|
||||
#define CPU_REV_MASK (0xf << 0)
|
||||
|
||||
#define CPU_ID_RAW(impl, part, var, rev) \
|
||||
|
|
|
|||
Loading…
Reference in a new issue