summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-02-23 19:54:34 +0000
committerjake <jake@FreeBSD.org>2002-02-23 19:54:34 +0000
commitd715e97c9bcdb0527a3c4a6379fbb0e2b6540376 (patch)
tree6445a5423f7a2f602050a0b8fce85152bf25af53 /sys/sparc64
parentaf798d036c3b115a979da1f8406df1df13e0c2fa (diff)
downloadFreeBSD-src-d715e97c9bcdb0527a3c4a6379fbb0e2b6540376.zip
FreeBSD-src-d715e97c9bcdb0527a3c4a6379fbb0e2b6540376.tar.gz
Add macros to extract the UPA module id from the UPA config register.
This is the hardware cpuid.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/include/upa.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sparc64/include/upa.h b/sys/sparc64/include/upa.h
index 32680fe..9685173 100644
--- a/sys/sparc64/include/upa.h
+++ b/sys/sparc64/include/upa.h
@@ -31,4 +31,10 @@
#define UPA_MEMSTART 0x1fc00000000UL
#define UPA_MEMEND 0x1ffffffffffUL
+#define UPA_CR_MID_SHIFT (17)
+#define UPA_CR_MID_SIZE (5)
+#define UPA_CR_MID_MASK (((1 << UPA_CR_MID_SIZE) - 1) << UPA_CR_MID_SHIFT)
+
+#define UPA_CR_GET_MID(cr) ((cr & UPA_CR_MID_MASK) >> UPA_CR_MID_SHIFT)
+
#endif /* _MACHINE_UPA_H_ */
OpenPOWER on IntegriCloud