Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/include first steps towards fujitsu SPARC64...
details: https://anonhg.NetBSD.org/src/rev/2173964a0f93
branches: trunk
changeset: 764921:2173964a0f93
user: mrg <mrg%NetBSD.org@localhost>
date: Thu May 12 05:42:05 2011 +0000
description:
first steps towards fujitsu SPARC64 support:
- add IMPL_* defines for fujitsu SPARC64 processors (mostly from openbsd)
- rename CPU_IS_JALAPENO() as CPU_IS_USIIIi()
- add GETVER_CPU_MANUF()
- add CPU_IS_SPITFIRE() and CPU_IS_SPARC64_V_UP()
diffstat:
sys/arch/sparc64/include/psl.h | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r 7f39af179299 -r 2173964a0f93 sys/arch/sparc64/include/psl.h
--- a/sys/arch/sparc64/include/psl.h Thu May 12 05:41:50 2011 +0000
+++ b/sys/arch/sparc64/include/psl.h Thu May 12 05:42:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psl.h,v 1.46 2010/02/01 05:00:59 mrg Exp $ */
+/* $NetBSD: psl.h,v 1.47 2011/05/12 05:42:05 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -224,6 +224,14 @@
#define VER_MAXTL_SHIFT 8
#define VER_MAXWIN 0x000000000000001fLL
+#define IMPL_SPARC64 0x01 /* SPARC64 */
+#define IMPL_SPARC64_II 0x02 /* SPARC64-II */
+#define IMPL_SPARC64_III 0x03 /* SPARC64-III */
+#define IMPL_SPARC64_IV 0x04 /* SPARC64-IV */
+#define IMPL_ZEUS 0x05 /* SPARC64-V */
+#define IMPL_OLYMPUS_C 0x06 /* SPARC64-VI */
+#define IMPL_JUPITER 0x07 /* SPARC64-VII */
+
#define IMPL_SPITFIRE 0x10 /* UltraSPARC-I */
#define IMPL_BLACKBIRD 0x11 /* UltraSPARC-II */
#define IMPL_SABRE 0x12 /* UltraSPARC-IIi */
@@ -317,8 +325,13 @@
/* Some simple macros to check the cpu type. */
#define GETVER_CPU_IMPL() ((getver() & VER_IMPL) >> VER_IMPL_SHIFT)
-#define CPU_IS_JALAPENO() (GETVER_CPU_IMPL() == IMPL_JALAPENO)
+#define GETVER_CPU_MANUF() ((getver() & VER_MANUF) >> VER_MANUF_SHIFT)
+#define CPU_IS_SPITFIRE() (GETVER_CPU_IMPL() == IMPL_SPITFIRE)
+#define CPU_IS_USIIIi() ((GETVER_CPU_IMPL() == IMPL_JALAPENO) || \
+ (GETVER_CPU_IMPL() == IMPL_SERRANO))
#define CPU_IS_USIII_UP() (GETVER_CPU_IMPL() >= IMPL_CHEETAH)
+#define CPU_IS_SPARC64_V_UP() (GETVER_CPU_MANUF() == MANUF_FUJITSU && \
+ GETVER_CPU_IMPL() >= IMPL_ZEUS)
static __inline int
intr_disable(void)
Home |
Main Index |
Thread Index |
Old Index