From owner-p4-projects@FreeBSD.ORG Fri Jul 14 16:17:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 09C5E16A4E6; Fri, 14 Jul 2006 16:17:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9091A16A4DA for ; Fri, 14 Jul 2006 16:17:53 +0000 (UTC) (envelope-from bms@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 344E943D64 for ; Fri, 14 Jul 2006 16:17:52 +0000 (GMT) (envelope-from bms@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6EGHqu9005334 for ; Fri, 14 Jul 2006 16:17:52 GMT (envelope-from bms@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6EGHqFv005330 for perforce@freebsd.org; Fri, 14 Jul 2006 16:17:52 GMT (envelope-from bms@freebsd.org) Date: Fri, 14 Jul 2006 16:17:52 GMT Message-Id: <200607141617.k6EGHqFv005330@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bms@freebsd.org using -f From: Bruce M Simpson To: Perforce Change Reviews Cc: Subject: PERFORCE change 101570 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2006 16:17:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=101570 Change 101570 by bms@bms_montagne on 2006/07/14 16:17:47 Add a basic timecounter wrapper for the MIPS32 Count register so we can tell the time. Depends on a deterministic DELAY() for calibration, which I haven't done yet. While we're here update clock.h to what is needed for mips. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/clock.h#2 edit .. //depot/projects/mips2/src/sys/mips/mips/tick.c#1 add Differences ... ==== //depot/projects/mips2/src/sys/mips/include/clock.h#2 (text+ko) ==== @@ -1,42 +1,38 @@ /*- - * Kernel interface to machine-dependent clock driver. - * Garrett Wollman, September 1994. - * This file is in the public domain. + * Copyright (c) 2006 Bruce M. Simpson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/clock.h,v 1.51 2005/12/22 22:16:05 jhb Exp $ + * $FreeBSD$ */ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ -#ifdef _KERNEL -/* - * i386 to clock driver interface. - * XXX large parts of the driver and its interface are misplaced. - */ -extern int adjkerntz; -extern int clkintr_pending; -extern int disable_rtc_set; -extern int pscnt; -extern int psdiv; -extern int statclock_disable; -extern u_int timer_freq; -extern int timer0_max_count; -extern uint64_t tsc_freq; -extern int tsc_is_broken; -extern int wall_cmos_clock; +#define wall_cmos_clock 0 +#define adjkerntz 0 -/* - * Driver to clock driver interface. - */ - -int acquire_timer2(int mode); -int release_timer2(void); -int rtcin(int val); +void tick_init(void); int sysbeep(int pitch, int period); -void init_TSC(void); -void init_TSC_tc(void); - -#endif /* _KERNEL */ #endif /* !_MACHINE_CLOCK_H_ */