]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
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. | |
11 | * | |
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 | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
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. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | ||
23 | #ifndef _I386_MTRR_H_ | |
24 | #define _I386_MTRR_H_ | |
25 | ||
26 | /* | |
27 | * Memory type range register (MTRR) support. | |
28 | */ | |
29 | ||
30 | #include <mach/std_types.h> | |
31 | #include <sys/appleapiopts.h> | |
32 | #include <sys/cdefs.h> | |
33 | ||
34 | #ifdef __APPLE_API_PRIVATE | |
35 | ||
36 | enum { | |
37 | MTRR_TYPE_UNCACHEABLE = 0, | |
38 | MTRR_TYPE_WRITECOMBINE = 1, | |
39 | MTRR_TYPE_WRITETHROUGH = 4, | |
40 | MTRR_TYPE_WRITEPROTECT = 5, | |
41 | MTRR_TYPE_WRITEBACK = 6 | |
42 | }; | |
43 | ||
44 | __BEGIN_DECLS | |
45 | ||
46 | extern void mtrr_init(void); | |
47 | extern kern_return_t mtrr_update_cpu(void); | |
48 | extern kern_return_t mtrr_update_all_cpus(void); | |
49 | ||
50 | extern kern_return_t mtrr_range_add( addr64_t phys_addr, | |
51 | uint64_t length, | |
52 | uint32_t mem_type); | |
53 | ||
54 | extern kern_return_t mtrr_range_remove( addr64_t phys_addr, | |
55 | uint64_t length, | |
56 | uint32_t mem_type); | |
57 | ||
58 | extern void pat_init(void); | |
59 | ||
60 | __END_DECLS | |
61 | ||
62 | #endif /* __APPLE_API_PRIVATE */ | |
63 | ||
64 | #endif /* !_I386_MTRR_H_ */ |