1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright (c) 2014 Joyent, Inc.  All rights reserved.
  14  */
  15 #include <sys/types.h>
  16 #include <sys/time.h>
  17 
  18 /*
  19  * Board Specific Module dependencies.
  20  */
  21 
  22 /*
  23  * In addition to the entry points defined below, a board is also required to
  24  * implement the following functions:
  25  *
  26  * void armv6_bsmdep_l2cacheinfo(void);
  27  *
  28  *      The board should set the value of 'armv6_l2cache_linesz'
  29  *
  30  * XXX Some day we should make all of this into modules that can be loaded early
  31  * by unix so that way we can have one kernel for all boards...
  32  */
  33 
  34 /*
  35  * While we would like to have a single consistent hrtime function across all of
  36  * the ARMv6 implementations, the chip itself leaves us rather lacking. As such,
  37  * we have to rely on each ARM board or implementation to do the work for us,
  38  * alas.
  39  */
  40 static hrtime_t
  41 dummy_hrtime(void)
  42 {
  43         return (0);
  44 }
  45 
  46 /*
  47  * Functions for a BSM to initialize
  48  */
  49 hrtime_t (*gethrtimeunscaledf)(void) = dummy_hrtime;
  50 
  51 /*
  52  * General entry points
  53  */
  54 hrtime_t
  55 gethrtime_unscaled(void)
  56 {
  57         return (gethrtimeunscaledf());
  58 }