diff options
author | Jake Burkholder <jake@FreeBSD.org> | 2002-02-23 19:54:34 +0000 |
---|---|---|
committer | Jake Burkholder <jake@FreeBSD.org> | 2002-02-23 19:54:34 +0000 |
commit | 502a37156158b8501b9b2d1be10faed8db96c37d (patch) | |
tree | 6445a5423f7a2f602050a0b8fce85152bf25af53 /sys/sparc64/include/upa.h | |
parent | 68ace64ebe01cf9a8ec4b98ed4d4e2c6f2a86689 (diff) | |
download | src-502a37156158b8501b9b2d1be10faed8db96c37d.tar.gz src-502a37156158b8501b9b2d1be10faed8db96c37d.zip |
Add macros to extract the UPA module id from the UPA config register.
This is the hardware cpuid.
Notes
Notes:
svn path=/head/; revision=91163
Diffstat (limited to 'sys/sparc64/include/upa.h')
-rw-r--r-- | sys/sparc64/include/upa.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sparc64/include/upa.h b/sys/sparc64/include/upa.h index 32680fecf470..9685173b5ff0 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_ */ |