]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
37839358 A |
6 | * The contents of this file constitute Original Code as defined in and |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
1c79356b | 11 | * |
37839358 A |
12 | * This Original Code and all software distributed under the License are |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
37839358 A |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | */ | |
25 | /* | |
26 | * HISTORY | |
27 | * | |
28 | * Revision 1.1.1.1 1998/09/22 21:05:36 wsanchez | |
29 | * Import of Mac OS X kernel (~semeria) | |
30 | * | |
31 | * Revision 1.1.1.1 1998/03/07 02:25:37 wsanchez | |
32 | * Import of OSF Mach kernel (~mburg) | |
33 | * | |
34 | * Revision 1.1.7.1 1994/09/23 01:54:44 ezf | |
35 | * change marker to not FREE | |
36 | * [1994/09/22 21:23:10 ezf] | |
37 | * | |
38 | * Revision 1.1.2.2 1993/08/24 09:39:55 rod | |
39 | * Created for iX86 common high resolution clock common code. CR #9400. | |
40 | * [1993/08/17 11:26:08 rod] | |
41 | * | |
42 | * $EndLog$ | |
43 | */ | |
44 | ||
45 | #include <vm/pmap.h> | |
46 | #include <i386/hi_res_clock.h> | |
47 | ||
48 | extern int *high_res_clock; | |
49 | ||
50 | vm_offset_t | |
51 | hi_res_clk_mmap( | |
52 | dev_t dev, | |
53 | vm_offset_t off, | |
54 | int prot) | |
55 | { | |
56 | if (prot & VM_PROT_WRITE) return (-1); | |
57 | return (i386_btop(pmap_extract(pmap_kernel(), | |
58 | (vm_offset_t) high_res_clock))); | |
59 | } |