summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/about_to_die.c34
-rw-r--r--util/config.h23
-rw-r--r--util/cpu.c27
-rw-r--r--util/cpu.h41
-rw-r--r--util/cpu_init.c40
-rw-r--r--util/cpu_subs.h23
-rw-r--r--util/cpus.h27
-rw-r--r--util/debug.h81
-rw-r--r--util/die.c54
-rw-r--r--util/phys_mem.h34
-rw-r--r--util/ref_count.h68
11 files changed, 0 insertions, 452 deletions
diff --git a/util/about_to_die.c b/util/about_to_die.c
deleted file mode 100644
index 9b039cc..0000000
--- a/util/about_to_die.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-
-/* Call this to declare intention to die,
- before doing final printfs and such.
- The default implementation does nothing,
- but typical actions might be to restore the video mode
- to a standard setting, or stop other processors.
- Note that this might very well be called several times
- before die() is finally called. */
-void about_to_die(int exit_code)
-{
-}
-
diff --git a/util/config.h b/util/config.h
deleted file mode 100644
index 23b2bf6..0000000
--- a/util/config.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/* This file is just an empty default config.h file. */
diff --git a/util/cpu.c b/util/cpu.c
deleted file mode 100644
index 0e45ac4..0000000
--- a/util/cpu.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-
-#include "cpu.h"
-
-struct cpu cpu[NCPUS];
-
diff --git a/util/cpu.h b/util/cpu.h
deleted file mode 100644
index 8eb0b23..0000000
--- a/util/cpu.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _UTIL_CPU_H_
-#define _UTIL_CPU_H_
-
-#include "cpus.h"
-
-
-/* There's one of these data structures per processor. */
-struct cpu
-{
-#define cpu_sub(name) struct cpu_##name name;
-#include "cpu_subs.h"
-#undef cpu_sub
-int dummy;
-};
-
-extern struct cpu cpu[NCPUS];
-
-
-#endif /* _UTIL_CPU_H_ */
diff --git a/util/cpu_init.c b/util/cpu_init.c
deleted file mode 100644
index c59824b..0000000
--- a/util/cpu_init.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-
-#include "cpu.h"
-
-void cpu_init(struct cpu *cpu)
-{
-#define cpu_sub(name) cpu_##name##_init(cpu);
-#include "cpu_subs.h"
-#undef cpu_sub
-}
-
-void cpus_init()
-{
- int n;
-
- for (n = 0; n < NCPUS; n++)
- cpu_init(&cpu[n]);
-}
-
diff --git a/util/cpu_subs.h b/util/cpu_subs.h
deleted file mode 100644
index 850ef38..0000000
--- a/util/cpu_subs.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/* This file is just a terminator for the set of cpu_subs.h headers. */
diff --git a/util/cpus.h b/util/cpus.h
deleted file mode 100644
index 355ecdb..0000000
--- a/util/cpus.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-
-/* Default cpus.h sets things up for a uniprocessor. */
-#define NCPUS 1
-#undef MULTIPROCESSOR
-
diff --git a/util/debug.h b/util/debug.h
deleted file mode 100644
index 7b2abb6..0000000
--- a/util/debug.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1995-1993 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * File: debug.h
- * Author: Bryan Ford
- *
- * This file contains definitions for kernel debugging,
- * which are compiled in on the DEBUG symbol.
- *
- */
-#ifndef _MACH_UTIL_DEBUG_H_
-#define _MACH_UTIL_DEBUG_H_
-
-#include <mach/macro_help.h>
-
-
-#ifndef NDEBUG
-
-extern void panic(const char *fmt, ...);
-
-#define here() printf("@ %s:%d\n", __FILE__, __LINE__)
-#define message(args) ({ printf("@ %s:%d: ", __FILE__, __LINE__); printf args; printf("\n"); })
-
-#define otsan() panic("%s:%d: off the straight and narrow!", __FILE__, __LINE__)
-
-#define assert(v) \
- MACRO_BEGIN \
- if (!(v)) \
- panic("%s:%d: failed assertion `"#v"'\n", \
- __FILE__, __LINE__); \
- MACRO_END
-
-#define do_debug(stmt) stmt
-
-#define debugmsg(args) \
- ({ printf("%s:%d: ", __FILE__, __LINE__); printf args; printf("\n"); })
-
-#define struct_id_decl unsigned struct_id;
-#define struct_id_init(p,id) ((p)->struct_id = (id))
-#define struct_id_denit(p) ((p)->struct_id = 0)
-#define struct_id_verify(p,id) \
- ({ if ((p)->struct_id != (id)) \
- panic("%s:%d: "#p" (%08x) struct_id should be "#id" (%08x), is %08x\n", \
- __FILE__, __LINE__, (p), (id), (p->struct_id)); \
- })
-
-#else /* NDEBUG */
-
-#define otsan()
-#define assert(v)
-#define do_debug(stmt)
-#define debugmsg(args)
-
-#define struct_id_decl
-#define struct_id_init(p,id)
-#define struct_id_denit(p)
-#define struct_id_verify(p,id)
-
-#endif /* NDEBUG */
-
-#endif _MACH_UTIL_DEBUG_H_
diff --git a/util/die.c b/util/die.c
deleted file mode 100644
index c2eeeaf..0000000
--- a/util/die.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1995-1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-
-#include <stdarg.h>
-
-/* Note: These routines are deprecated and should not be used anymore.
- Use panic() instead. */
-void die(const char *fmt, ...)
-{
- int exit_code = fmt != 0;
-
- about_to_die(exit_code);
-
- if (fmt)
- {
- va_list vl;
-
- va_start(vl, fmt);
- vprintf(fmt, vl);
- va_end(vl);
-
- putchar('\n');
-
- exit(exit_code);
- }
- else
- exit(exit_code);
-}
-
-void die_no_mem(void)
-{
- die("Not enough memory.");
-}
-
diff --git a/util/phys_mem.h b/util/phys_mem.h
deleted file mode 100644
index 2e18a6b..0000000
--- a/util/phys_mem.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _UTIL_PHYS_MEM_H_
-#define _UTIL_PHYS_MEM_H_
-
-#include <mach/machine/vm_types.h>
-
-
-/* This always holds the physical address
- of the top of known physical memory. */
-extern vm_offset_t phys_mem_max;
-
-
-#endif _UTIL_PHYS_MEM_H_
diff --git a/util/ref_count.h b/util/ref_count.h
deleted file mode 100644
index b6d3404..0000000
--- a/util/ref_count.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1995-1993 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * File: refcount.h
- *
- * This defines the system-independent atomic reference count data type.
- * (This file will often be overridden
- * by better machine-dependent implementations.)
- *
- */
-
-#ifndef _KERN_REF_COUNT_H_
-#define _KERN_REF_COUNT_H_
-
-#include <mach/macro_help.h>
-
-#include "simple_lock.h"
-
-
-struct ref_count {
- decl_simple_lock_data(,lock) /* lock for reference count */
- int count; /* number of references */
-};
-
-#define ref_count_init(refcount, refs) \
- MACRO_BEGIN \
- simple_lock_init(&(refcount)->lock); \
- ((refcount)->count = (refs)); \
- MACRO_END
-
-#define ref_count_take(refcount) \
- MACRO_BEGIN \
- simple_lock(&(refcount)->lock); \
- (refcount)->count++; \
- simple_unlock(&(refcount)->lock); \
- MACRO_END
-
-#define ref_count_drop(refcount, func) \
- MACRO_BEGIN \
- int new_value; \
- simple_lock(&(refcount)->lock); \
- new_value = --(refcount)->count; \
- simple_unlock(&(refcount)->lock); \
- if (new_value == 0) { func; } \
- MACRO_END
-
-
-#endif _KERN_REF_COUNT_H_