]> git.saurik.com Git - apple/xnu.git/blame - osfmk/i386/mtrr.h
xnu-792.24.17.tar.gz
[apple/xnu.git] / osfmk / i386 / mtrr.h
CommitLineData
1c79356b 1/*
91447636 2 * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
1c79356b 3 *
6601e61a 4 * @APPLE_LICENSE_HEADER_START@
1c79356b 5 *
6601e61a
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.
8f6c56a5 11 *
6601e61a
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
8f6c56a5
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
6601e61a
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.
8f6c56a5 19 *
6601e61a 20 * @APPLE_LICENSE_HEADER_END@
1c79356b 21 */
91447636
A
22
23#ifndef _I386_MTRR_H_
24#define _I386_MTRR_H_
25
1c79356b 26/*
91447636 27 * Memory type range register (MTRR) support.
1c79356b 28 */
1c79356b 29
91447636 30#include <mach/std_types.h>
9bccf70c 31#include <sys/appleapiopts.h>
91447636
A
32#include <sys/cdefs.h>
33
34#ifdef __APPLE_API_PRIVATE
35
36enum {
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
46extern void mtrr_init(void);
47extern kern_return_t mtrr_update_cpu(void);
48extern kern_return_t mtrr_update_all_cpus(void);
49
50extern kern_return_t mtrr_range_add( addr64_t phys_addr,
51 uint64_t length,
52 uint32_t mem_type);
9bccf70c 53
91447636
A
54extern kern_return_t mtrr_range_remove( addr64_t phys_addr,
55 uint64_t length,
56 uint32_t mem_type);
9bccf70c 57
91447636 58extern void pat_init(void);
1c79356b 59
91447636 60__END_DECLS
9bccf70c 61
91447636 62#endif /* __APPLE_API_PRIVATE */
9bccf70c 63
91447636 64#endif /* !_I386_MTRR_H_ */