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 Use TSO memory model for 32-bit use...
details: https://anonhg.NetBSD.org/src/rev/70ce7e96e558
branches: trunk
changeset: 494637:70ce7e96e558
user: eeh <eeh%NetBSD.org@localhost>
date: Sun Jul 09 22:02:32 2000 +0000
description:
Use TSO memory model for 32-bit userland.
diffstat:
sys/arch/sparc64/include/psl.h | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 2c9a94ec905a -r 70ce7e96e558 sys/arch/sparc64/include/psl.h
--- a/sys/arch/sparc64/include/psl.h Sun Jul 09 21:58:43 2000 +0000
+++ b/sys/arch/sparc64/include/psl.h Sun Jul 09 22:02:32 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psl.h,v 1.11 1999/08/05 18:28:01 thorpej Exp $ */
+/* $NetBSD: psl.h,v 1.12 2000/07/09 22:02:32 eeh Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -136,20 +136,31 @@
#define PSTATE_BITS "\20\14IG\13MG\12CLE\11TLE\10\7MM\6RED\5PEF\4AM\3PRIV\2IE\1AG"
+
+/*
+ * 32-bit code requires TSO or at best PSO since that's what's supported on
+ * SPARC V8 and earlier machines.
+ *
+ * 64-bit code sets the memory model in the ELF header.
+ *
+ * We're running kernel code in TSO for the moment so we don't need to worry
+ * about possible memory barrier bugs.
+ */
+
#ifdef __arch64__
#define PSTATE_PROM (PSTATE_MM_TSO|PSTATE_PRIV)
#define PSTATE_NUCLEUS (PSTATE_MM_TSO|PSTATE_PRIV|PSTATE_AG)
#define PSTATE_KERN (PSTATE_MM_TSO|PSTATE_PRIV)
#define PSTATE_INTR (PSTATE_KERN|PSTATE_IE)
-#define PSTATE_USER32 (PSTATE_MM_TSO|PSTATE_AM|PSTATE_IE) /* It's easier to debug */
+#define PSTATE_USER32 (PSTATE_MM_TSO|PSTATE_AM|PSTATE_IE)
#define PSTATE_USER (PSTATE_MM_RMO|PSTATE_AM|PSTATE_IE)
#else
#define PSTATE_PROM (PSTATE_MM_TSO|PSTATE_PRIV)
#define PSTATE_NUCLEUS (PSTATE_MM_TSO|PSTATE_AM|PSTATE_PRIV|PSTATE_AG)
#define PSTATE_KERN (PSTATE_MM_TSO|PSTATE_AM|PSTATE_PRIV)
#define PSTATE_INTR (PSTATE_KERN|PSTATE_IE)
-#define PSTATE_USER32 (PSTATE_MM_TSO|PSTATE_AM|PSTATE_IE) /* It's easier to debug */
-#define PSTATE_USER (PSTATE_MM_RMO|PSTATE_AM|PSTATE_IE)
+#define PSTATE_USER32 (PSTATE_MM_TSO|PSTATE_AM|PSTATE_IE)
+#define PSTATE_USER (PSTATE_MM_TSO|PSTATE_AM|PSTATE_IE)
#endif
/*
@@ -159,8 +170,7 @@
* +-----+-----+-----+--------+---+-----+
* | CCR | ASI | - | PSTATE | - | CWP |
* +-----+-----+-----+--------+---+-----+
- *
- */
+ * */
#define TSTATE_CWP 0x01f
#define TSTATE_PSTATE 0x6ff00
Home |
Main Index |
Thread Index |
Old Index