date and time created 90/04/24 12:59:13 by william
authorWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Wed, 25 Apr 1990 03:59:13 +0000 (19:59 -0800)
committerWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Wed, 25 Apr 1990 03:59:13 +0000 (19:59 -0800)
SCCS-vsn: sys/i386/isa/clock.c 5.1

usr/src/sys/i386/isa/clock.c [new file with mode: 0644]

diff --git a/usr/src/sys/i386/isa/clock.c b/usr/src/sys/i386/isa/clock.c
new file mode 100644 (file)
index 0000000..3e42636
--- /dev/null
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * William Jolitz.
+ *
+ * %sccs.include.386.c%
+ *
+ *     @(#)clock.c     5.1 (Berkeley) %G%
+ */
+
+/*
+ * Primitive clock interrupt routines.
+ */
+#include "param.h"
+#include "time.h"
+#include "kernel.h"
+#include "icu.h"
+
+startrtclock() {
+
+       /* initialize 8253 clock */
+       outb (0x43, 0x36);
+       outb (0x40, 1193182/60);
+       outb (0x40, (1193182/60)/256);
+}
+
+clkreld() {
+pg("clkreld");
+}
+
+/*
+ * Initialze the time of day register, based on the time base which is, e.g.
+ * from a filesystem.
+ */
+inittodr(base)
+       time_t base;
+{
+
+       time.tv_sec = base;
+}
+
+/*
+ * Restart the clock.
+ */
+resettodr()
+{
+}
+
+enablertclock() {
+       INTREN(IRQ0);
+       splnone();
+}